-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstallRIVET.sh
executable file
·53 lines (37 loc) · 1.17 KB
/
installRIVET.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
#!/bin/bash
set_environment () {
echo " Set environment variables"
# Here, define your installation paths, versions etc.
gccversion="$(gcc -dumpversion)"
INSTALLD="$1"
VERSION="$2"
TARBALL="$3"
YODAPATH="$4"
HEPMCPATH="$5"
FASTJETPATH="$6"
CXXFLAGS="$7"
LOCAL=$INSTALLD
# set SLC5 platform name:
LCG_PLATFORM=i686
if [[ "$(uname -m)" == "x86_64" ]] ; then
LCG_PLATFORM=x86_64
fi
}
run () {
workd=$(pwd)
echo " Unpack RIVET"
tar xvzf $TARBALL
echo " Enter directory"
cd Rivet-${VERSION}/
echo " Configure RIVET"
echo "LIBRARY_PATH=$LD_LIBRARY_PATH YODAPATH=$YODAPATH HEPMCPATH=$HEPMCPATH FASTJETPATH=$FASTJETPATH ./configure CXXFLAGS=$CXXFLAGS --prefix=$LOCAL --bindir=$LOCAL/bin --libdir=$LOCAL/lib --enable-static"
LIBRARY_PATH=$LD_LIBRARY_PATH YODAPATH=$YODAPATH HEPMCPATH=$HEPMCPATH FASTJETPATH=$FASTJETPATH ./configure CXXFLAGS="$CXXFLAGS" --prefix=$LOCAL --bindir=$LOCAL/bin --libdir=$LOCAL/lib --enable-static
echo " Compile RIVET"
LIBRARY_PATH=$LD_LIBRARY_PATH make
echo " Install RIVET"
LIBRARY_PATH=$LD_LIBRARY_PATH make install
echo " Finished RIVET installation"
cd $workd
}
set_environment "$@"
run "$@"