From a8fd5cac5b830cd0ea026567fc0de53c82c97e86 Mon Sep 17 00:00:00 2001 From: Marco Vermeulen Date: Fri, 23 Nov 2012 14:01:16 +0000 Subject: [PATCH] Remove dependency on zip command. Use unzip -T instead. --- src/main/resources/scripts/gvm | 2 +- src/main/resources/scripts/install.sh | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/main/resources/scripts/gvm b/src/main/resources/scripts/gvm index 6b90e102..5b7ad94d 100755 --- a/src/main/resources/scripts/gvm +++ b/src/main/resources/scripts/gvm @@ -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 "" diff --git a/src/main/resources/scripts/install.sh b/src/main/resources/scripts/install.sh index ed226c98..b2844a1d 100755 --- a/src/main/resources/scripts/install.sh +++ b/src/main/resources/scripts/install.sh @@ -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."