-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.sh
executable file
·42 lines (37 loc) · 1.19 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
mkdir -p tmp
if [ -z $GOMAP_LOC ]
then
GOMAP_LOC="$PWD"
fi
export SINGULARITY_BINDPATH="$PWD:$PWD,$SINGULARITY_BINDPATH"
# Declaring variables for different options
export IRODS_HOST="data.cyverse.org"
export IRODS_PORT="1247"
export IRODS_USER_NAME="anonymous"
export IRODS_ZONE_NAME="iplant"
export ICOMMANDS_IMG="icommands.sif"
export GOMAP_IMG="GOMAP.sif"
export GOMAP_VERSION="v1.4.0"
export GOMAP_URL="/iplant/home/shared/dillpicl/gomap/GOMAP/$GOMAP_VERSION/$GOMAP_IMG"
if [ ! -f $GOMAP_LOC/$GOMAP_IMG ]
then
# Making the irods directory and copying files if they don't exist
if [ ! -f "~/.irods/irods_environmnt.json" ]
then
mkdir -p ~/.irods &&
cp irods_environment.json ~/.irods/
fi
#Downloading icommands image if it doesn't exist.
if [ ! -f $ICOMMANDS_IMG ]
then
singularity pull -F $ICOMMANDS_IMG docker://quay.io/wkpalan/icommands
fi
#Downloading GOMAP Image
cmd="singularity run $ICOMMANDS_IMG iget -PT $GOMAP_URL $GOMAP_LOC/$GOMAP_IMG"
echo $cmd
eval $cmd
else
echo "The $GOMAP_LOC/$GOMAP_IMG exists" > /dev/stderr
echo "Delete the image if you want to download it again" > /dev/stderr
fi