parse-osrf-xml.pl: show user and password in output
[sitka/sitka-tools.git] / deployment / install-eg.sh
index 0f7c797..5f9433b 100755 (executable)
@@ -7,9 +7,9 @@ HOMEDIR="/home/${DEFAULT_USER}"
 BUILDDIR="${HOMEDIR}/evergreen"
 INSTALLDIR="/srv/openils"
 BRANCH="production/sitka_2_2"
-VERSION="2.2.0.sitka.1"
-STAMP_ID="2_2_0_sitka_1"
-ALT_STAMP_IDS="rel_2_2_0_sitka_1 2_2_0_sitka_0 rel_2_2_0_sitka_0 rel_2_2"
+VERSION="2.2.5.sitka.0"
+STAMP_ID="2_2_5_sitka_0"
+ALT_STAMP_IDS="rel_2_2_5_sitka_0 2_2_5_sitka_0 rel_2_2_5_sitka_0"
 SITKACONF="${HOMEDIR}/sysadmin"
 DEPLOYDIR="/home/opensrf/deploy"
 OPACSKIN="${DEPLOYDIR}/opacskin"
@@ -47,7 +47,7 @@ cd ${BUILDDIR} && make STAFF_CLIENT_STAMP_ID=${STAMP_ID} STAFF_CLIENT_VERSION=${
 chown -R opensrf:opensrf ${INSTALLDIR}
  
 # Apache stuff (as root):
-APACHEFILES="/etc/apache2/eg_vhost.conf /etc/apache2/startup.pl /etc/apache2/sites-available/eg.conf"
+APACHEFILES="/etc/apache2/eg_vhost.conf /etc/apache2/startup.pl /etc/apache2/sites-available/eg.conf /etc/apache2/envvars"
 for APACHEFILE in ${APACHEFILES}
 do
   cp ${SITKACONF}/files/${APACHEFILE}/${HOSTNAME} ${APACHEFILE}
@@ -95,9 +95,9 @@ if [ ! -d "${OPACSKIN}" ]
 then
   cd ${DEPLOYDIR} && git clone git://git.sitka.bclibraries.ca/sitka/opacskin.git
 fi
-cd ${OPACSKIN} && git checkout origin/bclibraries && \
+cd ${OPACSKIN} && git checkout -b bclibraries && \
   cd ${INSTALLDIR}/var/web/opac/skin && mv default orig-default && \
-  rsync -a --exclude=.git ${OPACSKIN}/bclibraries ${INSTALLDIR}/var/web/opac/skin/bclibraries && \
+  rsync -a --exclude=.git ${OPACSKIN} ${INSTALLDIR}/var/web/opac/skin/bclibraries && \
   ln -s ${INSTALLDIR}/var/web/opac/skin/bclibraries ${INSTALLDIR}/var/web/opac/skin/default
 
 # (b) circ scripts
@@ -130,11 +130,26 @@ cd ${INSTALLDIR}/var/web/opac/locale && cp -fdr en-US en-US-bak && cp -fdr en-CA
 # ensure apache conf contains deletepatron config (location should be ${INSTALLDIR}/var/web/deletepatron)
 cd ${INSTALLDIR}/var/web && git clone https://github.com/twirlip/deletepatron.git
 cd ${INSTALLDIR}/var/web/deletepatron && git checkout eg22 && find . -name *.pm | xargs sed -i -e 's|/openils|/srv/openils|g'
+apt-get install libcgi-session-perl libhtml-template-perl
 
 # 7. support scripts
 cp ${BUILDDIR}/Open-ILS/src/support-scripts/generate_circ_notices.pl ${INSTALLDIR}/bin
 cp ${BUILDDIR}/Open-ILS/src/support-scripts/oils_header.pl ${INSTALLDIR}/bin
 
-# 8. make sure opensrf owns all the stuff we just did
+# 8. setup start page
+if [ ! -d "${INSTALLDIR}/var/web/news" ]
+then
+  mkdir ${INSTALLDIR}/var/web/news
+fi
+NEWSFILES="index.html style.css"
+for NEWSFILE in ${NEWSFILES}
+do
+  if [ -f "${SITKACONF}/files/${INSTALLDIR}/var/web/news/${NEWSFILE}/${HOSTNAME}" ]
+  then
+    cp ${SITKACONF}/files/${INSTALLDIR}/var/web/news/${NEWSFILE}/${HOSTNAME} ${INSTALLDIR}/var/web/news/${NEWSFILE}
+  fi
+done
+
+# 9. make sure opensrf owns all the stuff we just did
 chown -R opensrf:opensrf ${INSTALLDIR}