forked from dampeUSTC/DMPSW
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpre-install.sh
executable file
·39 lines (32 loc) · 914 Bytes
/
pre-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
#! /bin/bash
:<<EOF
* $Id: pre-install.sh, 2014-10-29 23:46:58 DAMPE $
* Author(s):
* Chi WANG ([email protected]) 26/12/2013
*---------------------------------------------------
* Description:
* 1. check basic environment
* 2. create all dictionaries
*---------------------------------------------------
EOF
#+ functions
#----------------------------------------------------
CheckEnv(){
for var in $@;do
if [[ `env | grep $var | wc -l` -lt 1 ]];then
echo " ERROR: no shell variable \$$var"
exit 1
fi
done
}
echo "----> Checking Environment..."
CheckEnv ROOTSYS G4INSTALL G4LIB_USE_GDML
#----------------------------------------------------
for dir in {"Kernel","BaseLib","Event"}
do
pushd $dir 1>/dev/null
/bin/rm -f ./*/Dictionary* >&/dev/null
#echo "----> Creating Dictionary of $dir ..."
./createDictionary
popd 1>/dev/null
done