From 14cb4c12b15a298ee47f2b83632eedc196dd9b64 Mon Sep 17 00:00:00 2001 From: Cubik Date: Mon, 9 Jan 2023 00:04:31 -0500 Subject: [PATCH] warp4j: Allow JARs with script header (#1) Co-authored-by: John Vandenberg 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