From ea229d2775fbc0bbe229472ab05a91e0ff6016d4 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 25 Apr 2022 15:36:23 +0800 Subject: [PATCH] warp4j: Allow JARs with script header Fixes https://github.com/guziks/warp4j/issues/2 --- warp4j | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/warp4j b/warp4j index bac0480..7353a1c 100755 --- a/warp4j +++ b/warp4j @@ -341,7 +341,8 @@ fi # checking file is actually java archive if ([[ $(file $JAR) != *"Java"* ]] && # it could be "Java archive data" or "Java Jar file data (zip)" - [[ $(file $JAR) != *"Zip"* ]]) || # or "Zip archive data" + [[ $(file $JAR) != *"Zip"* ]] && # or "Zip archive data" + [[ $(file $JAR) != *"POSIX shell script executable (binary data)"* ]]) || # or JAR embedded in POSIX script [[ $JAR_EXTENSION_LOWERCASE != "jar" ]]; then fail_with "File \"$JAR\" is not a java archive" fi