-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·54 lines (43 loc) · 1.09 KB
/
install.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
#!/usr/bin/env bash
trap exit ERR
if [ "$1" == "-j" ] ; then
parallel=$1
fi
### check environment variables
if [ -z "$AGILE" ] || [ -z $(env | grep "AGILE=") ] ; then
echo "AGILE environment variable not set. Abort."
exit
fi
if [ -z "$CFITSIO" ] || [ -z $(env | grep "CFITSIO=") ] ; then
echo "CFITSIO environment variable not set. Abort."
exit
fi
if [ -z "$GSL" ] || [ -z $(env | grep "GSL=") ] ; then
echo "GSL environment variable not set. Abort."
exit
fi
CPP_WTOOLS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/C++WTOOLS"
if [ "$1" == "clean" ] ; then
cd $CPP_WTOOLS_DIR/CCL
make clean
cd $CPP_WTOOLS_DIR/CWT2
make clean
cd $CPP_WTOOLS_DIR/MET
make clean
exit
fi
echo "install CCL"
cd $CPP_WTOOLS_DIR/CCL
make ${parallel} install prefix=$AGILE
cd ..
echo "install CWT2"
cd $CPP_WTOOLS_DIR/CWT2
make ${parallel} install prefix=$AGILE
cd ..
echo "install MET"
cd $CPP_WTOOLS_DIR/MET
make ${parallel} install prefix=$AGILE
cd ..
echo "install scripts"
test -d $AGILE/scripts || mkdir -p $AGILE/scripts
cp -rf scripts/* $AGILE/scripts