[Debian-NP-Commits] r286 - people/vagrant/simple-cdd
Vagrant Cascadian
debian-np-devel@lists.alioth.debian.org
Sun, 28 Nov 2004 15:11:04 -0700
Author: vagrant-guest
Date: Sun Nov 28 15:10:39 2004
New Revision: 286
Modified:
people/vagrant/simple-cdd/build-simple-cdd
Log:
bugfixen: only backup and purge directory if it exists, move directory creation back to where it was, new variables for extras_dir stuff.
Modified: people/vagrant/simple-cdd/build-simple-cdd
==============================================================================
--- people/vagrant/simple-cdd/build-simple-cdd (original)
+++ people/vagrant/simple-cdd/build-simple-cdd Sun Nov 28 15:10:39 2004
@@ -127,13 +127,18 @@
echo simple-cdd: packages
make packages
-extras_dir="$simple_cdd_dir/extras/simple-cdd"
-mkdir -p $extras_dir
+extras_base_dir="$simple_cdd_dir/extras"
# make a backup of the extras directory, just in case
-echo "backing up $simple_cdd_dir/extras/: old.extras.tgz"
-tar cvpf $simple_cdd_dir/old.extras.tgz $simple_cdd_dir/extras/
-rm -rf $simple_cdd_dir/extras/
+if [ -n "$extras_base_dir" ] && [ -d "$extras_base_dir" ]; then
+ echo "backing up $extras_base_dir: old.extras.tgz"
+ tar cvpf $simple_cdd_dir/old.extras.tgz $extras_base_dir/
+ echo "purging $extras_base_dir"
+ rm -rf $extras_base_dir
+fi
+
+extras_dir="$extras_base_dir/simple-cdd"
+mkdir -p "$extras_dir"
for f in simple-cdd-profiles simple-cdd-packages simple-cdd-preseed ; do
all_extras="$all_extras $simple_cdd_dir/$f"