installLabkey.sh 945 B

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