瀏覽代碼

Create Archive directory if it does not exist. Make sure mv knows we want to move stuff into a dir

svn:r18411
Peter Palfrader 15 年之前
父節點
當前提交
a050da815b
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      contrib/directory-archive/tar-them-up

+ 4 - 2
contrib/directory-archive/tar-them-up

@@ -114,12 +114,14 @@ done
 
 
 
+[ -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