Browse code

tweaks to the hacky clean script

Anthony Young authored on 2011/11/11 07:36:42
Showing 1 changed files
... ...
@@ -3,19 +3,19 @@
3 3
 
4 4
 set -o errexit
5 5
 
6
-if [ ! "$FORCE" = 1 ]; then
6
+if [ ! "$FORCE" = "yes" ]; then
7 7
     echo "FORCE not set to 1.  Make sure this is something you really want to do.  Exiting."
8 8
     exit 1
9 9
 fi
10 10
 
11
-exit
12 11
 virsh list | cut -d " " -f1 | grep -v "-" | egrep -e "[0-9]" | xargs -n 1 virsh destroy || true
13 12
 virsh net-list | grep active | cut -d " " -f1 | xargs -n 1 virsh net-destroy || true
14
-killall dnsmasq
15
-rm -rf jobs
13
+killall dnsmasq || true
14
+if [ "$CLEAN" = "yes" ]; then
15
+    rm -rf jobs
16
+fi
16 17
 rm /var/lib/jenkins/jobs
17 18
 git checkout -f
18 19
 git fetch
19 20
 git merge origin/jenkins
20 21
 ./build_jenkins.sh
21
-