diff --git a/build_ohana.sh b/build_ohana.sh index f5852cf9e03d7eb4fb4f739cfaabb5ba214ed725..a25c92b1522c265e436ebd72d6e8b581a8c6806b 100755 --- a/build_ohana.sh +++ b/build_ohana.sh @@ -44,17 +44,17 @@ nvm install $version echo "**************************************************************************************" echo "Done installing correct npm version." -echo "**************************************************************************************" -echo "Setting up theming ..." if [[ $build_option == 1 || $build_option == 3 ]]; then - ln -s "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/dist - rm -rf src/patterns - ln -s ../../src/patterns src/patterns -else - mv "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ + echo "**************************************************************************************" + echo "Setting up theming ..." + if [[ $build_option == 1 || $build_option == 3 ]]; then + ln -s "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/dist + rm -rf src/patterns + ln -s ../../src/patterns src/patterns + fi + echo "**************************************************************************************" + echo "Done setting up theming." fi -echo "**************************************************************************************" -echo "Done setting up theming." echo "**************************************************************************************" echo "Running npm install ..." @@ -71,6 +71,19 @@ npm run build echo "**************************************************************************************" echo "Done running npm run build." +if [[ $build_option != 1 && $build_option != 3 ]]; then + echo "**************************************************************************************" + echo "Setting up css/js and removing ohana ..." + mv "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ + cd "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist/css + ls | grep -v all.min.css | parallel rm + cd "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana/dist/js + ls | grep -v all.min.js | parallel rm + cd "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_ohana/ohana + echo "**************************************************************************************" + echo "Done setting up css/js and removing ohana." +fi + if [[ $env_option == 1 ]]; then echo "**************************************************************************************" echo "Creating symlink for ohana ..."