still doesn't work. #(@*(@*# where the @*#*@&# is that logging directory going wrong?
[feisty_meow.git] / scripts / archival / unpack.sh
index dfa3d1c34c21034fda4aad81a9e45e93b7aa3fec..f5c2aa93a2623158a169b475a280e1685c05f497 100644 (file)
@@ -54,17 +54,25 @@ fi
 if [[ $unpack_file =~ .*\.tar$ \
     || $unpack_file =~ .*\.tar\.gz$ \
     || $unpack_file =~ .*\.tar\.bz2$ \
-    || $unpack_file =~ .*\.tgz$ ]]; then
-  tar -xf $unpack_file
-elif [[ $unpack_file =~ .*\.zip$ ]]; then
-  unzip $unpack_file
+    || $unpack_file =~ .*\.iar$ \
+    || $unpack_file =~ .*\.oar$ \
+    || $unpack_file =~ .*\.tgz$ \
+    ]]; then
+  tar -xf $unpack_file &>/dev/null
+elif [[ $unpack_file =~ .*\.zip$ \
+    || $unpack_file =~ .*\.odt$ \
+    || $unpack_file =~ .*\.jar$ \
+    || $unpack_file =~ .*\.war$ \
+    ]]; then
+  unzip $unpack_file &>/dev/null
 fi
 save_err=$?
 
+popd &>/dev/null
+
 if [ $save_err -ne 0 ]; then
   echo "There was a failure reported while unpacking: $unpack_file"
   echo "into the directory: $unpack_dir"
-  popd &>/dev/null
   exit 1
 else
   echo "Unpacked file $(basename $unpack_file) into folder: $unpack_dir"