]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/encoding/import.sh: fix target directory
authorYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Fri, 9 Mar 2012 21:32:18 +0000 (13:32 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 9 Mar 2012 22:01:38 +0000 (14:01 -0800)
Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
src/test/encoding/import.sh

index 1c5241dd7cf573d6a6c1773634aae242d412b772..fb5064c6acf5464f3f4cb6bcd6ab51e62d39e17b 100755 (executable)
@@ -8,12 +8,16 @@ archive=$3
 
 [ -d "$archive/$ver" ] || mkdir "$archive/$ver"
 
+dest_dir="$archive/$ver/objects"
+
+[ -d "$dest_dir" ] || mkdir "$dest_dir"
+
 for f in `find $src -type f`
 do
     n=`basename $f`
     type=`echo $n | sed 's/__.*//'`
     md=`md5sum $f | awk '{print $1}'`
 
-    [ -d "$archive/$ver/$type" ] || mkdir $archive/$ver/$type
-    [ -e "$archive/$ver/$type/$md" ] || cp $f $archive/$ver/$type/$md
-done
\ No newline at end of file
+    [ -d "$dest_dir/$type" ] || mkdir $dest_dir/$type
+    [ -e "$dest_dir/$type/$md" ] || cp $f $dest_dir/$md
+done