EG install scripts: specify git branch for sysadmin.git
[sitka/sitka-tools.git] / deployment / install-eg.sh
index 545d622..152df94 100755 (executable)
@@ -8,10 +8,13 @@ HOMEDIR="/home/${DEFAULT_USER}"
 #BUILDDIR="${HOMEDIR}/${EGRELEASE}"
 BUILDDIR="${HOMEDIR}/evergreen"
 INSTALLDIR="/srv/openils"
 #BUILDDIR="${HOMEDIR}/${EGRELEASE}"
 BUILDDIR="${HOMEDIR}/evergreen"
 INSTALLDIR="/srv/openils"
-BRANCH="upgrade/eg28/phase2-tpac"
-STAMP_ID="rel_2_8_0"
-ALT_STAMP_IDS="2_8_0 rel_2_8_beta 2_8_beta"
+BRANCH="upgrade/eg28/phase3-tpac"
+STAMP_ID="rel_2_8_1"
+ALT_STAMP_IDS="2_8_1 rel_2_8_beta 2_8_beta rel_2_8_0 2_8_0"
+VERSION="2.8.1.sitka.0"
 SITKACONF="${HOMEDIR}/sysadmin"
 SITKACONF="${HOMEDIR}/sysadmin"
+SITKACONF_BRANCH="eg28"
+SITKATOOLS="/root/sitka-tools"
 
 suwrap() {
   su -s /bin/bash -l -c "source ~/.bashrc ; $1" $2
 
 suwrap() {
   su -s /bin/bash -l -c "source ~/.bashrc ; $1" $2
@@ -25,7 +28,7 @@ then
   # this will fail unless DEFAULT_USER has read access to the repo
   suwrap "cd ${HOMEDIR} && git clone git+ssh://git@git.sitka.bclibraries.ca/sitka-infra/sysadmin" ${DEFAULT_USER}
 fi
   # this will fail unless DEFAULT_USER has read access to the repo
   suwrap "cd ${HOMEDIR} && git clone git+ssh://git@git.sitka.bclibraries.ca/sitka-infra/sysadmin" ${DEFAULT_USER}
 fi
-suwrap "cd ${SITKACONF} && git pull" ${DEFAULT_USER}
+suwrap "cd ${SITKACONF} && git fetch origin && git checkout ${SITKACONF_BRANCH} && git pull" ${DEFAULT_USER}
 
 # checkout EG source
 if [ ! -d "${BUILDDIR}" ]
 
 # checkout EG source
 if [ ! -d "${BUILDDIR}" ]
@@ -40,7 +43,7 @@ suwrap "cd ${BUILDDIR} && git fetch origin && git checkout ${BRANCH} && git pull
  
 # as root
 cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-trusty
  
 # as root
 cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-trusty
-cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-trusty-developer # required for web client
+#cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-trusty-developer # required for web client
 # by default, CPAN needs some manual input at this point; you can just accept all defaults
  
 # as DEFAULT_USER
 # by default, CPAN needs some manual input at this point; you can just accept all defaults
  
 # as DEFAULT_USER
@@ -50,7 +53,7 @@ suwrap "cd ${BUILDDIR} && make" ${DEFAULT_USER}
 suwrap "cd ${BUILDDIR}/build/i18n && make LOCALE=fr-CA install && make LOCALE=en-CA install" ${DEFAULT_USER}
  
 # as root
 suwrap "cd ${BUILDDIR}/build/i18n && make LOCALE=fr-CA install && make LOCALE=en-CA install" ${DEFAULT_USER}
  
 # as root
-cd ${BUILDDIR} && make STAFF_CLIENT_STAMP_ID=${STAMP_ID} install
+cd ${BUILDDIR} && make STAFF_CLIENT_VERSION=${VERSION} STAFF_CLIENT_STAMP_ID=${STAMP_ID} install
 mv ${INSTALLDIR}/var/web/reports/fm_IDL.xml ${INSTALLDIR}/var/web/reports/fm_IDL.xml.orig && cp ${INSTALLDIR}/conf/fm_IDL.xml ${INSTALLDIR}/var/web/reports/
 chown -R opensrf:opensrf ${INSTALLDIR}
  
 mv ${INSTALLDIR}/var/web/reports/fm_IDL.xml ${INSTALLDIR}/var/web/reports/fm_IDL.xml.orig && cp ${INSTALLDIR}/conf/fm_IDL.xml ${INSTALLDIR}/var/web/reports/
 chown -R opensrf:opensrf ${INSTALLDIR}
  
@@ -108,21 +111,24 @@ done
  
 # 3. install circ scripts and opac skins - DEPRECATED
 
  
 # 3. install circ scripts and opac skins - DEPRECATED
 
-# 4. avoid 404s - XXX deprecated?
-#touch ${INSTALLDIR}/var/web/css/skin/default/register_custom.css
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/patron_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/common_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/offline_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/auth_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/cat_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/circ_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/patron_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/common_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/offline_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/auth_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/cat_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/circ_custom.properties
-#touch ${INSTALLDIR}/var/web/xul/server/skin/custom.js
+# 4a. avoid 404s
+touch ${INSTALLDIR}/var/web/css/skin/default/register_custom.css
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/patron_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/common_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/offline_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/auth_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/cat_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/circ_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/patron_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/common_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/offline_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/auth_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/cat_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/circ_custom.properties
+touch ${INSTALLDIR}/var/web/xul/server/skin/custom.js
+
+# 4b. workaround for LP#1461683
+cd ${INSTALLDIR}/var/web/xul/server/locale/en-CA && mv multiclass_search_help.html multiclass_search_help.html.orig && ln -s ../en-US/multiclass_search_help.html
 
 # 5. locale hack - XXX deprecated?
 #cd ${INSTALLDIR}/var/web/opac/locale && cp -fdr en-US en-US-bak && cp -fdr en-CA en-US
 
 # 5. locale hack - XXX deprecated?
 #cd ${INSTALLDIR}/var/web/opac/locale && cp -fdr en-US en-US-bak && cp -fdr en-CA en-US
@@ -151,6 +157,11 @@ do
   fi
 done
 
   fi
 done
 
+# 8.5 offline patron list
+if [ ! -d "${INSTALLDIR}/var/data/offline/blocked" ] ; then mkdir -p ${INSTALLDIR}/var/data/offline/blocked ; fi
+if [ ! -e "${INSTALLDIR}/var/web/standalone/list.txt" ] ; then ln -s ${INSTALLDIR}/var/data/offline/blocked/patron-block-list.txt list.txt ; fi
+if [ ! -e "${INSTALLDIR}/bin/update-offline-blocked-list.sh" ] ; then cp ${SITKATOOLS}/maintenance/update-offline-blocked-list.sh ${INSTALLDIR}/bin/update-offline-blocked-list.sh ; fi
+
 # 9. make sure opensrf owns all the stuff we just did
 chown -R opensrf:opensrf ${INSTALLDIR}
 chown -R opensrf:opensrf /home/opensrf
 # 9. make sure opensrf owns all the stuff we just did
 chown -R opensrf:opensrf ${INSTALLDIR}
 chown -R opensrf:opensrf /home/opensrf