Created
July 13, 2015 20:33
-
-
Save teddywing/b435941d50176017b60c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
if [ $# == 0 ]; then | |
MYSQL_USERNAME='' | |
MYSQL_DATABASE='' | |
elif [ $# != 2 ]; then | |
echo "Usage: $0 <mysql username> <mysql database name>" 1>&2 | |
exit 1 | |
fi | |
[[ ! -z "$1" ]] && MYSQL_USERNAME=$1 | |
[[ ! -z "$2" ]] && MYSQL_DATABASE=$2 | |
mysql -u $MYSQL_USERNAME $MYSQL_DATABASE -e \ | |
"UPDATE waffle_flag \ | |
SET waffle_flag.everyone = waffle_flag.everyone ^ 1 \ | |
WHERE waffle_flag.name = 'enable_new_tutoring';" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment