Created
July 9, 2012 08:14
-
-
Save jacquesbh/3075019 to your computer and use it in GitHub Desktop.
Jbh notice (Magento module) bash script (JolieBox)
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
toDev () { | |
if [[ $# < 2 ]]; then | |
echo "Usage: toDev <db name> <website name>"; | |
return 1 | |
fi | |
db=$1 | |
shift | |
NAME=$@ | |
req=" | |
UPDATE core_config_data SET scope = 'default', scope_id = '0', path = 'dev/jbh_notice/admin_message', value = '$NAME - Development Admin Panel' WHERE path = 'dev/jbh_notice/admin_message'; | |
UPDATE core_config_data SET scope = 'default', scope_id = '0', path = 'dev/jbh_notice/admin_bg_color', value = '#6289fe' WHERE path = 'dev/jbh_notice/admin_bg_color'; | |
UPDATE core_config_data SET scope = 'default', scope_id = '0', path = 'dev/jbh_notice/frontend_active', value = '1' WHERE path = 'dev/jbh_notice/frontend_active'; | |
UPDATE core_config_data SET scope = 'default', scope_id = '0', path = 'dev/jbh_notice/frontend_message', value = '$NAME - Development env.' WHERE path = 'dev/jbh_notice/frontend_message'; | |
UPDATE core_config_data SET scope = 'default', scope_id = '0', path = 'dev/jbh_notice/frontend_bg_color', value = '#6289fe' WHERE path = 'dev/jbh_notice/frontend_bg_color'; | |
-- Here the update for CDN - change it if you need ! | |
UPDATE core_config_data SET value = REPLACE(value, 'static.joliebox.com', 'static.local.joliebox.com'); | |
-- UPDATE core_config_data SET scope = '' | |
" | |
echo $req | mysql $db | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment