X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=blobdiff_plain;f=production%2Fexample_apps%2Fzippy_maps%2Fprepare_project.sh;fp=production%2Fexample_apps%2Fzippy_maps%2Fprepare_project.sh;h=1497ebd22aa2a0ac1fc6ec6246cf865f3192ed4c;hp=0000000000000000000000000000000000000000;hb=cd9948b7e23127e694c1c500828430554f84790b;hpb=43099b0a5606877a692b484b58c807cf8ea20bd7 diff --git a/production/example_apps/zippy_maps/prepare_project.sh b/production/example_apps/zippy_maps/prepare_project.sh new file mode 100755 index 00000000..1497ebd2 --- /dev/null +++ b/production/example_apps/zippy_maps/prepare_project.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# bails if any step fails. +function check_result() { + if [ $? -ne 0 ]; then + echo -e "failed on: $*" + error_sound + exit 1 + fi +} + + +echo running composer update process... +composer update +check_result "updating project with composer" + +## echo copying in updated cakephp-geo google maps helper code. this should be unnecessary when they update upstream for static map fix. +## cp -fv ./updates_pending/cakephp-geo/src/View/Helper/GoogleMapHelper.php ./vendor/dereuromark/cakephp-geo/src/View/Helper/GoogleMapHelper.php +## check_result "copying the updated google maps helper file" + +echo -e "\n\nHave the two config files app.php and config_google.php been configured yet AND has the database for the app been added to mysql? (y/N)" +read line + +if [ $line != 'y' -a $line != 'Y' -a $line != 'yes' -a $line != 'YES' ]; then + echo "Please configure the two config files using their default versions as templates (see the config directory for app.default.php and config_google.default.php)" + exit 1 +fi + +echo running migration code to build the database... +./bin/cake migrations migrate +check_result "running the database migrations" + + +