Created
June 15, 2011 15:34
-
-
Save docteurklein/1027357 to your computer and use it in GitHub Desktop.
update_core_config.sh
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
#!/bin/sh | |
if test -z "$1" | |
then | |
echo "Please give database name" | |
echo "Usage: $0 <db_name> <URL>" | |
return | |
fi | |
if test -z "$2" | |
then | |
echo "Please give absolute URL" | |
echo "Usage: $0 $1 <URL>" | |
return | |
fi | |
echo "UPDATE core_config_data | |
SET value = '$2' | |
WHERE path = 'web/unsecure/base_url' | |
OR path = 'web/secure/base_url'; | |
" | mysql -uroot -p $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment