File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22set -euo pipefail
33
4- TOOL= " all "
4+ CONTAINER_ENGINE= " singularity "
55
66while [[ $# -gt 0 ]]
77do
88 key=" $1 "
99 case $key in
10- -t |--tool )
11- TOOL =" $2 "
10+ -e |--engine )
11+ CONTAINER_ENGINE =" $2 "
1212 shift # past argument
1313 shift # past value
1414 ;;
1919done
2020
2121# Install Nextflow
22- if [[ " $TOOL " = nextflow ]] || [[ " $TOOL " = all ]]
23- then
24- cd $HOME
25- curl -fsSL get.nextflow.io | bash
26- chmod +x nextflow
27- sudo mv nextflow /usr/local/bin/
28- fi
22+ mkdir /tmp/nextflow
23+ cd /tmp/nextflow
24+ wget -qO- get.nextflow.io | bash
25+ sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
2926
3027# Install Singularity
31- if [[ " $TOOL " = singularity ]] || [[ " $TOOL " = all ]]
28+ if [[ " $CONTAINER_ENGINE " = singularity ]]
3229then
33- sudo apt-get install squashfs-tools
34- cd $HOME
30+ if [[ " $SGT_VER " = ' ' ]]
31+ then
32+ SGT_VER=$( curl --silent " https://api.github.com/repos/Singularityware/Singularity/releases/latest" | grep -Po ' "tag_name": "\K.*?(?=")' )
33+ fi
34+ sudo apt-get install libarchive-dev squashfs-tools
35+ mkdir /tmp/singularity
36+ cd /tmp/singularity
3537 wget https://github.com/singularityware/singularity/releases/download/$SGT_VER /singularity-$SGT_VER .tar.gz
3638 tar xvf singularity-$SGT_VER .tar.gz
3739 cd singularity-$SGT_VER
3840 ./configure --prefix=/usr/local
3941 make
4042 sudo make install
41- cd ..
42- rm -rf singularity- $SGT_VER *
43+ cd ${TRAVIS_BUILD_DIR}
44+ rm -rf /tmp/ singularity
4345fi
You can’t perform that action at this time.
0 commit comments