12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #!/bin/bash
- . $(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.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";
- #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 tomcat8 user space in docker
- mv ${TMP_LABKEY}/tomcat-lib ${TOMCAT_DIR}/lib
- echo "Cleanup";
- rm -rf ${TMP_LABKEY}
- echo "Done"
|