-
Notifications
You must be signed in to change notification settings - Fork 26
/
FASTA-36.3.8d_install
executable file
·60 lines (51 loc) · 1.57 KB
/
FASTA-36.3.8d_install
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
58
59
60
#!/usr/bin/env bash
###############################################
# Installing FASTA using GCC
#
# v36.3.8d
#
# by Brian Alston, Aug 2016
#
# Using Ian's require function to load modules
#
# Will need modules: see list of modules below.
VERSION=${VERSION:-36.3.8d}
VERSION_DATE=${VERSION_DATE:-13Apr16}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/FASTA/v${VERSION}}
MD5=${MD5:-5cf9000282c67fda5301ac6ef65b0366}
SRC_ARCHIVE=${SRC_ARCHIVE:- https://github.com/wrpearson/fasta36/archive/v${VERSION}_${VERSION_DATE}.tar.gz}
export PATH=$INSTALL_PREFIX/bin:$PATH
dirname=$(dirname $0 2>/dev/null || pwd)
INCLUDES_DIR=${INCLUDES_DIR:-${dirname}/includes}
source ${INCLUDES_DIR}/module_maker_inc.sh
source ${INCLUDES_DIR}/require_inc.sh
require gcc-libs/4.9.2
require compilers/gnu/4.9.2
temp_dir=`mktemp -d -p /dev/shm`
# temp_dir='/home/ccspapp/Software/cancerit'
echo "Building in $temp_dir ..."
cd $temp_dir
module list
read -p "Press [Enter] key to start ..."
cd $temp_dir
wget $SRC_ARCHIVE
ARCHIVE=`basename $SRC_ARCHIVE`
CHECKSUM=`md5sum $ARCHIVE | awk '{print $1}'`
if [[ "$MD5" == "$CHECKSUM" ]]
then
tar xvzf $ARCHIVE
cd fasta36-${VERSION}_${VERSION_DATE}/src
make -f ../make/Makefile.linux_sse2 all 2>&1 | tee make_all_log
cd ../bin
mkdir -p ${INSTALL_PREFIX}/bin
cp * ${INSTALL_PREFIX}/bin
cd ../doc
mkdir -p ${INSTALL_PREFIX}/man/man1
cp *.1 ${INSTALL_PREFIX}/man/man1/
mkdir -p ${INSTALL_PREFIX}/doc
cp fasta_guide.pdf ${INSTALL_PREFIX}/doc/
else
echo "***** Hash mismatch,"
echo " Expected: $MD5"
echo " Got: $CHECKSUM"
fi