[or-cvs] r18411: {tor} Create Archive directory if it does not exist. Make sure mv (tor/trunk/contrib/directory-archive)

weasel at seul.org weasel at seul.org
Fri Feb 6 22:43:46 UTC 2009


Author: weasel
Date: 2009-02-06 17:43:45 -0500 (Fri, 06 Feb 2009)
New Revision: 18411

Modified:
   tor/trunk/contrib/directory-archive/tar-them-up
Log:
Create Archive directory if it does not exist.  Make sure mv knows we want to move stuff into a dir

Modified: tor/trunk/contrib/directory-archive/tar-them-up
===================================================================
--- tor/trunk/contrib/directory-archive/tar-them-up	2009-02-06 10:45:29 UTC (rev 18410)
+++ tor/trunk/contrib/directory-archive/tar-them-up	2009-02-06 22:43:45 UTC (rev 18411)
@@ -114,12 +114,14 @@
 
 
 
+[ -d Archive ] || mkdir Archive
+
 for kind in consensus status; do
 	t="$kind"es-$year-$month.tar.bz2
-	! [ -e Archive/"$t" ] && mv "$t" Archive
+	! [ -e Archive/"$t" ] && mv "$t" Archive/"$t"
 done
 
 for kind in extra-infos server-descriptors; do
 	t="$kind"-$year-$month.tar.bz2
-	! [ -e Archive/"$t" ] && mv "$t" Archive
+	! [ -e Archive/"$t" ] && mv "$t" Archive/"$t"
 done



More information about the tor-commits mailing list