Remove dependency on zip command. Use unzip -T instead.

This commit is contained in:
Marco Vermeulen
2012-11-23 14:01:16 +00:00
parent 774acc12da
commit a8fd5cac5b
2 changed files with 1 additions and 13 deletions

View File

@@ -87,7 +87,7 @@ function download {
function validate_zip {
ZIP_ARCHIVE="$1"
ZIP_OK=$(zip -T "$ZIP_ARCHIVE" | grep 'OK')
ZIP_OK=$(unzip -t "$ZIP_ARCHIVE" | grep 'No errors detected in compressed data')
if [ -z "$ZIP_OK" ]; then
rm "$ZIP_ARCHIVE"
echo ""

View File

@@ -72,18 +72,6 @@ if [ ! -f "$JAVA_HOME/bin/java" ]; then
exit 0
fi
echo "Looking for zip..."
if [ -z $(which zip) ]; then
echo "Not found."
echo "======================================================================================================"
echo " Please install zip on your system using your favourite package manager."
echo ""
echo " Restart after installing zip."
echo "======================================================================================================"
echo ""
exit 0
fi
echo "Looking for unzip..."
if [ -z $(which unzip) ]; then
echo "Not found."