-
Notifications
You must be signed in to change notification settings - Fork 77
/
install_dependencies.sh
executable file
·57 lines (44 loc) · 1.08 KB
/
install_dependencies.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
57
#!/bin/bash
set -x
set -e
start_dir=$(pwd)
EMBOSS_VERSION="6.5.7"
EMBOSS_DOWNLOAD_URL="ftp://emboss.open-bio.org/pub/EMBOSS/old/6.5.0/EMBOSS-${EMBOSS_VERSION}.tar.gz"
# Make an install location
if [ ! -d "${HOME}/dependencies" ]; then
mkdir ${HOME}/dependencies
fi
cd ${HOME}/dependencies
build_dir=$(pwd)
# DOWNLOAD ALL THE THINGS
download () {
url=$1
download_location=$2
if [ -e $download_location ]; then
echo "Skipping download of $url, $download_location already exists"
else
echo "Downloading $url to $download_location"
wget $url -O $download_location
fi
}
download $EMBOSS_DOWNLOAD_URL "${build_dir}/emboss-${EMBOSS_VERSION}.tgz"
# Build all the things
cd $build_dir
## Emboss
emboss_dir=$(pwd)/EMBOSS-${EMBOSS_VERSION}
if [ ! -d $emboss_dir ]; then
tar xzf emboss-${EMBOSS_VERSION}.tgz
fi
cd $emboss_dir
if [ -e "${emboss_dir}/build/bin/restrict" ]; then
echo "Already built Emboss; skipping build"
else
mkdir build
./configure --prefix ${emboss_dir}/build
make
make install
fi
export EMBOSS_ROOT=${emboss_dir}/build
cd $start_dir
set +x
set +e