Get rid of the work directory on success.
[util-vserver.git] / scripts / vserver-build.template
index 7274dcd..b2efab5 100644 (file)
@@ -1,4 +1,4 @@
-# $Id:$        --*- sh -*--
+# $Id$ --*- sh -*--
 
 # Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -22,12 +22,14 @@ eval set -- "$tmp"
 
 DISTRIBUTION=:
 use_pkgmgmt=
+no_dev_sanity=
 declare -a TEMPLATE=()
 while true; do
     case "$1" in
        -d)             DISTRIBUTION=$2; shift;;
        --debug)        set -x;;
        --pkgmgmt)      use_pkgmgmt=1;;
+       --nodevsanity)  no_dev_sanity=1;;
        -t|--template)
                        case "$2" in
                             /*)        f="$2";;
@@ -85,6 +87,11 @@ for t in "${TEMPLATE[@]}"; do
 
     $DECOMPRESS "$t" | $EXTRACT
 done
+
+test -z "$no_dev_sanity" && {
+    rm -rf dev/*
+    populateDev
+}
 popd &> /dev/null
 
 test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"