Skip to content

Instantly share code, notes, and snippets.

@docteurklein
Created June 15, 2011 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save docteurklein/1027357 to your computer and use it in GitHub Desktop.
Save docteurklein/1027357 to your computer and use it in GitHub Desktop.
update_core_config.sh
#!/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