#!/bin/bash #binaries available at labkey-public/Resources #and #https://www.labkey.org/Documentation/list-grid.view?listId=634&query.ignoreFilter=1 #recent ones, here #https://www.labkey.org/Documentation/wiki-page.view?name=prevReleases . $(dirname $0)/env.sh LABKEY=LabKey22.3.2-3-community if [ $# -gt 0 ] ; then case $1 in 18.1) LABKEY=LabKey18.1-57017.17-professional-bin;; 18|18.3) LABKEY=LabKey18.3.3-62784.7-community-bin;; 19|19.3) LABKEY=LabKey19.3.10-65330.20-community-bin;; 20|20.11) LABKEY=LabKey20.11.8-10-community;; 21|21.11) LABKEY=LabKey21.11.11-14-community;; 22|22.3) LABKEY=LabKey22.3.2-3-community;; 23|23.11) LABKEY=LabKey23.11.11-11-13-community;; *) echo "Failed to find appropriate version for $1" exit 1; esac; fi; echo "Using $LABKEY"; #full path to source SFW_SRC=$LBDOCKER/packages/$LABKEY.tar.gz #this is temp only TMP_DIR=$HOME/tmp if [ ! -d ${TMP_DIR} ] ; then mkdir ${TMP_DIR}; fi; #is there anything relevant in $LABKEY_DIR? if [ ! -d $LABKEY_DIR ] ; then mkdir $LABKEY_DIR; fi; #unpack to ${TMP_DIR}/$LABKEY TMP_LABKEY=${TMP_DIR}/$LABKEY; #make sure we are starting from a clean slate if [ -d ${TMP_LABKEY} ] ; then rm -rf ${TMP_LABKEY}; fi; #untar in ${TMP_DIR} cd ${TMP_DIR} && tar xvzf ${SFW_SRC}; echo "Using distribution in ${TMP_LABKEY}"; #copy from $TMP_LABKEY to labkey space in docker LABKEY_SRC_DIRS=("labkeywebapp" "modules" "pipeline-lib") for d in ${LABKEY_SRC_DIRS[@]} ; do mv ${TMP_LABKEY}/$d ${LABKEY_DIR}/$d; done; #check if required dirs are missing and create them LABKEY_DIRS=("files" "externalModules") for d in ${LABKEY_DIRS[@]} ; do if [ ! -d ${LABKEY_DIR}/$d ] ; then mkdir ${LABKEY_DIR}/$d; fi; done; #tomcat-lib goes to tomcat user space in docker mv ${TMP_LABKEY}/tomcat-lib ${TOMCAT_DIR}/lib echo "Cleanup of tem directory"; rm -rf ${TMP_LABKEY} echo "Done" echo "Change COMPOSE to appropriate yaml in bin/env.sh!"