installLabkey.sh 944 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. LABKEY=LabKey22.3.2-3-community
  3. if [ $# -gt 0 ] ;
  4. then
  5. case $1 in
  6. 18.1)
  7. LABKEY=LabKey18.1-57017.17-professional-bin;;
  8. 18.3)
  9. LABKEY=LabKey18.3.3-62784.7-community-bin;;
  10. 20.7)
  11. LABKEY=LabKey20.7.8-66016.22-community-bin;;
  12. 21.1)
  13. LABKEY=LabKey21.11.10-11-community;;
  14. 22.3)
  15. LABKEY=LabKey22.3.2-3-community;;
  16. esac;
  17. fi;
  18. echo "Using $LABKEY";
  19. SFW_SRC=$HOME/software/packages/$LABKEY.tar.gz
  20. LABKEY_BASE=$HOME/labkey
  21. SFW_DIR=$HOME/software/src
  22. if [ ! -d $LABKEY_BASE ] ;
  23. then
  24. mkdir $LABKEY_BASE;
  25. fi;
  26. CFG_DIR=$HOME/config
  27. LABKEY_DIR=$SFW_DIR/$LABKEY;
  28. LINK_DIRS=("tomcat-lib" "labkeywebapp" "modules" "pipeline-lib")
  29. if [ ! -d ${LABKEY_DIR} ] ; then
  30. cd ${SFW_DIR};
  31. tar xvzf ${SFW_SRC};
  32. echo "Using distribution in ${LABKEY_DIR}";
  33. fi;
  34. for d in ${LINK_DIRS[@]} ;
  35. do
  36. if [ -L ${LABKEY_BASE}/$d ] ;
  37. then
  38. rm ${LABKEY_BASE}/$d;
  39. fi;
  40. ln -s ${LABKEY_DIR}/$d ${LABKEY_BASE}/$d;
  41. done;