-
Notifications
You must be signed in to change notification settings - Fork 5
/
clean_support.sh
executable file
·89 lines (72 loc) · 2.12 KB
/
clean_support.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
DO_CLEAN="no"
CLEAN_ARCHIVE="no"
HELPFLAG="no"
while getopts "efh" options; do
case $options in
e) DO_CLEAN="yes";;
f) CLEAN_ARCHIVE="yes";;
h) HELPFLAG="yes";;
esac
done
if [ "$DO_CLEAN" == "no" ]; then
HELPFLAG="yes"
fi
if [ "$HELPFLAG" == "yes" ]; then
echo "./clean_support.sh -e # do the clean - this flag MUST be supplied to remove ANYTHING"
echo " -f # clean the user files in the archive directory as well"
echo " -h # show help and exit"
echo " "
echo " Examples: "
echo " ./clean_support.sh -e # clean the install"
echo " ./clean_support.sh -e -f # clean the install and the archive"
echo " ./clean_support.sh -f # NO CLEAN. print help and exit!"
echo " ./clean_support.sh -e -h # NO CLEAN. print help and exit!"
exit 0
fi
if [ "$CLEAN_ARCHIVE" == "yes" ]; then
echo "Cleaning archived env setup files..."
rm -f archive/*environment_setup*
echo "Cleaning archived GSL tar balls..."
rm -rf archive/*gsl*tar.gz
echo "Cleaning archived HepMC tar balls..."
rm -rf archive/*HepMC*tar.gz
# DO NOT remove the log4cpp source bundle we need to install.
echo "Cleaning archived log4cpp tar balls..."
rm -rf archive/1*log4cpp.tgz
echo "Cleaning archived LHAPDF tar balls..."
rm -rf archive/*lhapdf*tar.gz
rm -rf archive/*LHAPDF*tar.gz
echo "Cleaning archived boost tar balls..."
rm -rf archive/*boost*.tar.gz
echo "Cleaning archived Pythia8 tar balls..."
rm -rf archive/*pythia8*.tgz
# NOTE: RooMUHistos is not archived (yet); nothing to remove
fi
echo "Cleaning env setup file..."
rm -f environment_setup.sh
echo "Cleaning GSL..."
rm -rf gsl
echo "Cleaning HepMC..."
rm -rf hepmc
echo "Cleaning boost..."
rm -rf boost
echo "Cleaning LHAPDF..."
rm -rf lhapdf
echo "Cleaning ROOT..."
if [ -d root ]; then
rm -rf root
fi
if [ -d build_root ]; then
rm -rf build_root
fi
echo "Cleaning log4cpp..."
rm -rf log4cpp
echo "Cleaning Pythia6..."
rm -rf pythia6
echo "Cleaning Pythia8..."
rm -rf pythia8*
echo "Cleaning RooMUHistos..."
rm -rf RooMUHistos*
echo "Cleaning CMake..."
rm -rf cmake-*