Revert "update install-eg.sh to install EG 2.6 beta1 from tarball"
[sitka/sitka-tools.git] / deployment / install-eg.sh
index 88a341a..70fe8b1 100755 (executable)
@@ -1,18 +1,15 @@
 #!/bin/bash
 # IMPORTANT! This script assumes you have already installed OpenSRF.
 
-HOSTNAME="nonprod-26"
+HOSTNAME="nonprod-24"
 DEFAULT_USER="sitkastaff"
 HOMEDIR="/home/${DEFAULT_USER}"
-EGRELEASE="Evergreen-ILS-2.6-beta1"
-#BUILDDIR="${HOMEDIR}/evergreen"
-BUILDDIR="${HOMEDIR}/${EGRELEASE}"
+BUILDDIR="${HOMEDIR}/evergreen"
 INSTALLDIR="/srv/openils"
-#BRANCH="production/sitka_2_4"
-#VERSION="2.4.0.sitka.0"
-#STAMP_ID="2_4_0_sitka_0"
-STAMP_ID="rel_2_6_beta1"
-#ALT_STAMP_IDS="rel_2_4_0_sitka_0 rel_2_4_0_sitka_0"
+BRANCH="production/sitka_2_4"
+VERSION="2.4.0.sitka.0"
+STAMP_ID="2_4_0_sitka_0"
+ALT_STAMP_IDS="rel_2_4_0_sitka_0 rel_2_4_0_sitka_0"
 SITKACONF="${HOMEDIR}/sysadmin"
 
 suwrap() {
@@ -32,8 +29,9 @@ suwrap "cd ${SITKACONF} && git pull" ${DEFAULT_USER}
 # checkout EG source
 if [ ! -d "${BUILDDIR}" ]
 then
-  suwrap "cd ${HOMEDIR} && wget http://evergreen-ils.org/downloads/previews/${EGRELEASE}.tar.gz && tar xzf ${EGRELEASE}.tar.gz" ${DEFAULT_USER}
+  suwrap "cd ${HOMEDIR} && git clone git://git.sitka.bclibraries.ca/sitka/evergreen evergreen" ${DEFAULT_USER}
 fi
+suwrap "cd ${BUILDDIR} && git fetch origin && git checkout ${BRANCH} && git pull" ${DEFAULT_USER}
  
 # as root
 cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-precise
@@ -46,7 +44,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
-cd ${BUILDDIR} && make STAFF_CLIENT_STAMP_ID=${STAMP_ID} install
+cd ${BUILDDIR} && make STAFF_CLIENT_STAMP_ID=${STAMP_ID} STAFF_CLIENT_VERSION=${VERSION} install
 chown -R opensrf:opensrf ${INSTALLDIR}
  
 # Apache stuff (as root):
@@ -93,10 +91,10 @@ cp -r ${INSTALLDIR}/var/web/js/dojo-release-1.3.3/* ${INSTALLDIR}/var/web/js/doj
 # 2. set up staff client
 cd ${INSTALLDIR}/var/web/xul && rm server && rm current
 cd ${INSTALLDIR}/var/web/xul && ln -s ${STAMP_ID} current && ln -s current/server server
-#for ALT_STAMP_ID in ${ALT_STAMP_IDS}
-#do
-#  cd ${INSTALLDIR}/var/web/xul && ln -s current ${ALT_STAMP_ID}
-#done
+for ALT_STAMP_ID in ${ALT_STAMP_IDS}
+do
+  cd ${INSTALLDIR}/var/web/xul && ln -s current ${ALT_STAMP_ID}
+done
  
 # 3. install circ scripts and opac skins - DEPRECATED