Skip to content

Instantly share code, notes, and snippets.

@DevertNet
Created October 20, 2015 08:34
Show Gist options
  • Save DevertNet/3152156ddbd603d6d0d2 to your computer and use it in GitHub Desktop.
Save DevertNet/3152156ddbd603d6d0d2 to your computer and use it in GitHub Desktop.
#!/bin/bash
exec < /dev/tty
if [ ! -f ./system.txt ]; then
echo "File not found!"
read -p "Status of the system (local,dev or live)? [n]" -r
echo $REPLY > ./system.txt
fi
dumpname=`cat system.txt`
read -p "Add DB dump to commit? [n]" -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
eval "n98 db:dump ./$dumpname.sql"
eval "git add ./$dumpname.sql"
echo "xx"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment