We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9205984 commit cbe3132Copy full SHA for cbe3132
export.sh
@@ -1,4 +1,9 @@
1
+_os="`uname`"
2
_now=$(date +"%m_%d_%Y")
3
_file="wp-data/data_$_now.sql"
4
docker-compose exec db sh -c 'exec mysqldump "$MYSQL_DATABASE" -uroot -p"$MYSQL_ROOT_PASSWORD"' > $_file
-sed -i 1,1d $_file # Removes the password warning from the file
5
+if [[ $_os == "Darwin"* ]] ; then
6
+ sed -i '.bak' 1,1d $_file
7
+else
8
+ sed -i 1,1d $_file # Removes the password warning from the file
9
+fi
0 commit comments