From 61ee2df22a78b27b94e396fc6ba3d2fd5bfbccc6 Mon Sep 17 00:00:00 2001
From: Igor Biki <ibiki@uwaterloo.ca>
Date: Wed, 2 Jun 2021 15:00:11 -0400
Subject: [PATCH] ISTWCMS-4861 Adding environment option to build_gesso script.

---
 build_gesso.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/build_gesso.sh b/build_gesso.sh
index e648e450..85433fdd 100755
--- a/build_gesso.sh
+++ b/build_gesso.sh
@@ -1,6 +1,7 @@
-build_option=${1:-1}
-HTML_PATH=${2:-"/var/www/html"}
-DRUPAL_PATH=${3:-/var/www/drupal8}
+env_option=${1:-1}
+build_option=${2:-1}
+HTML_PATH=${3:-"/var/www/html"}
+DRUPAL_PATH=${4:-/var/www/drupal8}
 gesso_version="8.x-3.2-uw_wcms1"
 
 if [[ -L "$HTML_PATH/uw_wcms_gesso" ]]; then
@@ -92,9 +93,9 @@ if [[ $build_option == 1 || $build_option == 3 ]]; then
   echo "**************************************************************************************"
   echo "Creating symlink for gesso ..."
   cd $HTML_PATH
-  if [[ $build_option == 1 ]]; then
+  if [[ $env_option == 1 ]]; then
     ln -s "$DRUPAL_PATH"/web/profiles/uw_base_profile/modules/custom/uw_wcms_gesso uw_wcms_gesso
-  elif [[ $build_option == 2 ]]; then
+  elif [[ $env_option == 2 ]]; then
     cd /var/www/html/web
     ln -s ./profiles/uw_base_profile/modules/custom/uw_wcms_gesso uw_wcms_gesso
     cd -
-- 
GitLab