installLabkey.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/bash
  2. . $(dirname $0)/env.sh
  3. LABKEY=LabKey22.3.2-3-community
  4. if [ $# -gt 0 ] ;
  5. then
  6. case $1 in
  7. 18.1)
  8. LABKEY=LabKey18.1-57017.17-professional-bin;;
  9. 18.3)
  10. LABKEY=LabKey18.3.3-62784.7-community-bin;;
  11. 20.7)
  12. LABKEY=LabKey20.7.8-66016.22-community-bin;;
  13. 21.1)
  14. LABKEY=LabKey21.11.10-11-community;;
  15. 22.3)
  16. LABKEY=LabKey22.3.2-3-community;;
  17. esac;
  18. fi;
  19. echo "Using $LABKEY";
  20. #full path to source
  21. SFW_SRC=$LBDOCKER/packages/$LABKEY.tar.gz
  22. #this is temp only
  23. TMP_DIR=$HOME/tmp
  24. if [ ! -d ${TMP_DIR} ] ;
  25. then
  26. mkdir ${TMP_DIR};
  27. fi;
  28. #is there anything relevant in $LABKEY_DIR?
  29. if [ ! -d $LABKEY_DIR ] ;
  30. then
  31. mkdir $LABKEY_DIR;
  32. fi;
  33. #unpack to ${TMP_DIR}/$LABKEY
  34. TMP_LABKEY=${TMP_DIR}/$LABKEY;
  35. #make sure we are starting from a clean slate
  36. if [ -d ${TMP_LABKEY} ] ; then
  37. rm -rf ${TMP_LABKEY};
  38. fi;
  39. #untar in ${TMP_DIR}
  40. cd ${TMP_DIR} && tar xvzf ${SFW_SRC};
  41. echo "Using distribution in ${TMP_LABKEY}";
  42. #LINK_DIRS=("tomcat-lib" "labkeywebapp" "modules" "pipeline-lib")
  43. LABKEY_DIRS=("labkeywebapp" "modules" "pipeline-lib")
  44. #copy from $TMP_LABKEY to labkey space in docker
  45. for d in ${LABKEY_DIRS[@]} ;
  46. do
  47. mv ${TMP_LABKEY}/$d ${LABKEY_DIR}/$d;
  48. done;
  49. #tomcat-lib goes to tomcat8 user space in docker
  50. mv ${TMP_LABKEY}/tomcat-lib ${TOMCAT_DIR/lib
  51. echo "Cleanup";
  52. #rm -rf ${TMP_LABKEY}
  53. echo "Done"