X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=bin%2Fgitify;h=dc2b93dbb92f590ccf9c2a4ff535b03d347c3771;hb=867047cd42eb9ea5f73ddf4abc0b80a4f558c127;hp=9b8a8893084a7101f6086289ab43b98828907d7d;hpb=bf3a05b1aa831598642cbf3cb64d497ddf049fa0;p=civicrm-core.git diff --git a/bin/gitify b/bin/gitify index 9b8a889308..dc2b93dbb9 100755 --- a/bin/gitify +++ b/bin/gitify @@ -113,6 +113,35 @@ function do_gencode() { popd > /dev/null } +## usage: do_setupconf +function do_setupconf() { + pushd "$1" >> /dev/null + echo "[[Initialize bin/setup.conf]]" + if [ ! -f "bin/setup.conf" ]; then + pwd + echo cp "bin/setup.conf.txt" "bin/setup.conf" + cp "bin/setup.conf.txt" "bin/setup.conf" + fi + echo "[[chmod 600 bin/setup.conf]]" + chmod 600 bin/setup.conf + echo "" + echo "====================[ Next steps (for Civi v4.6+) ]====================" + echo " * Edit the following file and fill in credentials for the CiviCRM DB." + echo " $1/bin/setup.conf" + echo " * Perform one of these steps:" + echo " + Run 'bin/setup.sh -Dg' to download and generate missing code." + echo " + Run 'bin/setup.sh' to download code and reset the CiviCRM DB" + echo " with the latest schema." + echo " * If this is a network-accessible server (eg staging/production), then" + echo " setup.conf may present a security issue. The permissions have been" + echo " preset to restrict access in most servers - but this may not work" + echo " in all environments. Please:" + echo " + Check whether the file is web-accessible." + echo " + Optionally, change the permissions." + echo " + Optionally, delete the file." + popd > /dev/null +} + ########################################### ## config_repo ## 1 2 3 4 @@ -236,6 +265,8 @@ case "$CIVICRM_CMS" in config_repo civicrm-joomla "$CIVICRM_ROOT/joomla" "$CIVICRM_BRANCH" "../../tools/scripts/git" config_repo civicrm-wordpress "$CIVICRM_ROOT/WordPress" "$CIVICRM_BRANCH" "../../tools/scripts/git" ;; + none) + ;; *) echo "Unrecognized CMS: $CIVICRM_CMS" esac @@ -244,6 +275,9 @@ if [ "$CIVICRM_L10N" == "--l10n" ]; then do_targzify "https://download.civicrm.org/civicrm-l10n-core/archives/civicrm-l10n-daily.tar.gz" "civicrm-l10n-daily.tar.gz" "$CIVICRM_ROOT/l10n" fi -if [ -z "$SKIP_GENCODE" ]; then +if [ -f "$CIVICRM_ROOT/composer.json" ]; then + ## Civi v4.6+ + do_setupconf "$CIVICRM_ROOT" +elif [ -z "$SKIP_GENCODE" ]; then do_gencode "$CIVICRM_ROOT" fi