projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
still finding fudge-up on startup
[feisty_meow.git]
/
scripts
/
archival
/
test_arch.sh
diff --git
a/scripts/archival/test_arch.sh
b/scripts/archival/test_arch.sh
index be1fddb4d101443412917f56ab03b092fc73c056..1a37be2bfdb8f499ad33cf382fd24709af9fade5 100644
(file)
--- a/
scripts/archival/test_arch.sh
+++ b/
scripts/archival/test_arch.sh
@@
-37,6
+37,7
@@
if [ ! -f "$archive_file" ]; then
fi
fi
fi
fi
+save_err=1
if [[ $archive_file =~ .*\.tar$ \
|| $archive_file =~ .*\.tar\.gz$ \
|| $archive_file =~ .*\.tar\.bz2$ \
if [[ $archive_file =~ .*\.tar$ \
|| $archive_file =~ .*\.tar\.gz$ \
|| $archive_file =~ .*\.tar\.bz2$ \
@@
-47,6
+48,7
@@
if [[ $archive_file =~ .*\.tar$ \
|| $archive_file =~ .*\.snarf$ \
]]; then
tar -tf $archive_file &>/dev/null
|| $archive_file =~ .*\.snarf$ \
]]; then
tar -tf $archive_file &>/dev/null
+ save_err=$?
elif [[ $archive_file =~ .*\.zip$ \
|| $archive_file =~ .*\.epub$ \
|| $archive_file =~ .*\.odt$ \
elif [[ $archive_file =~ .*\.zip$ \
|| $archive_file =~ .*\.epub$ \
|| $archive_file =~ .*\.odt$ \
@@
-54,12
+56,16
@@
elif [[ $archive_file =~ .*\.zip$ \
|| $archive_file =~ .*\.war$ \
]]; then
unzip -t $archive_file &>/dev/null
|| $archive_file =~ .*\.war$ \
]]; then
unzip -t $archive_file &>/dev/null
-else
- # we don't know this as an archive.
- exit 0
+ save_err=$?
+elif [[ "$archive_file" =~ .*\.7z$ ]]; then
+ 7z t "$archive_file" &>/dev/null
+ save_err=$?
+elif [[ "$archive_file" =~ .*\.rar$ ]]; then
+ rar t "$archive_file" &>/dev/null
+ save_err=$?
fi
fi
-if [ $
?
-ne 0 ]; then
+if [ $
save_err
-ne 0 ]; then
echo "** failure while testing: $archive_file"
exit 1
else
echo "** failure while testing: $archive_file"
exit 1
else