#!/bin/bash LABKEY=LabKey22.3.2-3-community if [ $# -gt 0 ] ; then case $1 in 18.1) LABKEY=LabKey18.1-57017.17-professional-bin;; 18.3) LABKEY=LabKey18.3.3-62784.7-community-bin;; 20.7) LABKEY=LabKey20.7.8-66016.22-community-bin;; 21.1) LABKEY=LabKey21.11.10-11-community;; 22.3) LABKEY=LabKey22.3.2-3-community;; esac; fi; echo "Using $LABKEY"; SFW_SRC=$HOME/software/packages/$LABKEY.tar.gz LABKEY_BASE=$HOME/labkey SFW_DIR=$HOME/software/src if [ ! -d ${SFW_DIR} ] ; then mkdir ${SFW_DIR}; fi; if [ ! -d $LABKEY_BASE ] ; then mkdir $LABKEY_BASE; fi; CFG_DIR=$HOME/config LABKEY_DIR=$SFW_DIR/$LABKEY; LINK_DIRS=("tomcat-lib" "labkeywebapp" "modules" "pipeline-lib") if [ ! -d ${LABKEY_DIR} ] ; then cd ${SFW_DIR}; tar xvzf ${SFW_SRC}; echo "Using distribution in ${LABKEY_DIR}"; fi; for d in ${LINK_DIRS[@]} ; do if [ -L ${LABKEY_BASE}/$d ] ; then rm ${LABKEY_BASE}/$d; fi; ln -s ${LABKEY_DIR}/$d ${LABKEY_BASE}/$d; done;