forked from pfred/pfred-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint.sh
executable file
·56 lines (43 loc) · 1.1 KB
/
entrypoint.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
SCRIPTDIR="/home/pfred/scripts"
SCRIPTS="pfred \
BioPerl-1.6.1 \
oligowalk \
ensemblapi \
bowtie"
BOWTIEL="a b c d e"
WEB=https://github.com/pfred/pfred-docker/releases/download/v1.0-alpha
echo "Setting up environment..."
# Get Tomcat
if [ ! -d "/home/pfred/tomcat" ]; then
echo "Downloading Tomcat from port 9090"
wget $WEB/tomcat.tar.gz
for f in *.tar.gz; do tar -xvf "$f"; done
rm *.tar.gz
fi
# Get scripts
cd $SCRIPTDIR
for dir in $SCRIPTS
do
if [ ! -d $SCRIPTDIR/$dir ]; then
echo "Downloading $dir from github"
if [ $dir == "bowtie" ]; then
for letter in $BOWTIEL
do
wget $WEB/$dir.tar.gz.parta$letter
done
cat bowtie.tar.gz.parta* > bowtie.tar.gz
rm *.tar.gz.parta*
else
wget $WEB/$dir.tar.gz
fi
tar -xvf $dir.tar.gz
rm *.tar.gz
fi
done
chmod +x pfred/*
ls
cat /home/pfred/setup_env.sh >> /root/.bashrc && source /root/.bashrc
startup.sh
# Keep container running
while true; do sleep 1000; done