installLabkey.sh 890 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. :x
  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. esac;
  16. fi;
  17. echo "Using $LABKEY";
  18. SFW_SRC=$HOME/software/packages/$LABKEY.tar.gz
  19. LABKEY_BASE=$HOME/labkey
  20. SFW_DIR=$HOME/software/src
  21. if [ ! -d $LABKEY_BASE ] ;
  22. then
  23. mkdir $LABKEY_BASE;
  24. fi;
  25. CFG_DIR=$HOME/config
  26. LABKEY_DIR=$SFW_DIR/$LABKEY;
  27. LINK_DIRS=("tomcat-lib" "labkeywebapp" "modules" "pipeline-lib")
  28. if [ ! -d ${LABKEY_DIR} ] ; then
  29. cd ${SFW_DIR};
  30. tar xvzf ${SFW_SRC};
  31. echo "Using distribution in ${LABKEY_DIR}";
  32. fi;
  33. for d in ${LINK_DIRS[@]} ;
  34. do
  35. if [ -L ${LABKEY_BASE}/$d ] ;
  36. then
  37. rm ${LABKEY_BASE}/$d;
  38. fi;
  39. ln -s ${LABKEY_DIR}/$d ${LABKEY_BASE}/$d;
  40. done;