mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-01-31 17:53:09 -05:00
Remove dependency on zip command. Use unzip -T instead.
This commit is contained in:
@@ -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 ""
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user