-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
executable file
·45 lines (34 loc) · 1.11 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
43
44
45
#!/bin/bash
####################### Prefixes #######################
if ! [ -x "$(command -v applgrid-config)" ]; then
echo "APPLgrid config file not found in path!"
echo "aborting installation"
exit -1
fi
if ! [ -x "$(command -v apfel-config)" ]; then
echo "APFEL config file not found in path!"
echo "aborting installation"
exit -1
fi
APPLVER=applgrid-$(applgrid-config --version)
TARGET=$(applgrid-config --incdir)/appl_grid/
PREFIX=$(apfel-config --prefix)
####################### Header installation #######################
echo "Detected APPLgrid version: " $APPLVER" .. supplementing with full headers ... "
wget http://applgrid.hepforge.org/downloads/$APPLVER.tgz
if [ ! -f "./"$APPLVER".tgz" ]; then
echo "APPLgrid tgz failed to download!"
exit -1
fi
tar -xzf ./$APPLVER.tgz
cp "./"$APPLVER"/src/"*.h $TARGET
rm $APPLVER.tgz
rm -rf ./$APPLVER
####################### Installation #######################
echo
echo "Headers supplemented, proceeding to installation in APFEL directory: "$PREFIX
echo
autoreconf -i
./configure --prefix=$PREFIX
make && make check && make install
exit 1