X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=bin%2Fsetup.sh;h=fc59804214d07d7a9af6066d29b578543388f105;hb=694ccbf41adc31bce4d056fcc46930ba9c2e15e5;hp=ab58b716259df2b99bfd4f391918c364e1067be5;hpb=6fd0519667b8c37759460c6c1516a22210418aa5;p=civicrm-core.git diff --git a/bin/setup.sh b/bin/setup.sh index ab58b71625..fc59804214 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -151,8 +151,24 @@ if [ -n "$DO_DOWNLOAD" ]; then fi BOWER=$(pickcmd node_modules/bower/bin/bower bower) - # Without the force flag bower won't check for new versions or verify that installed software matches version specified in bower.json - $BOWER install -f + if [ -f "$BOWER" ]; then + NODE=$(pickcmd node nodejs) + BOWER="$NODE $BOWER" + fi + # Without the force flag, bower may not check for new versions or verify that installed software matches version specified in bower.json + # With the force flag, bower will ignore all caches and download all deps. + if [ -n "$OFFLINE" ]; then + BOWER_OPT= + elif [ ! -f "bower_components/.setupsh.ts" ]; then + ## First run -- or cleanup from failed run + BOWER_OPT=-f + elif [ "bower.json" -nt "bower_components/.setupsh.ts" ]; then + ## Bower.json has changed since last run + BOWER_OPT=-f + fi + [ -f "bower_components/.setupsh.ts" ] && rm -f "bower_components/.setupsh.ts" + $BOWER install $BOWER_OPT + touch bower_components/.setupsh.ts popd fi @@ -212,9 +228,6 @@ fi if [ -n "$DO_FLUSH" ]; then pushd "$CALLEDPATH/.." - # run the cli script to build the menu and the triggers - "$PHP5PATH"php bin/cli.php -e System -a flush --triggers 1 --session 1 - # reset config_backend and userFrameworkResourceURL which gets set # when config object is initialized $MYSQLCMD -e "UPDATE civicrm_domain SET config_backend = NULL; UPDATE civicrm_setting SET value = NULL WHERE name = 'userFrameworkResourceURL';"