diff --git a/update-Nitrov3.sh b/update-Nitrov3.sh index 703c7f5..cbe88f0 100755 --- a/update-Nitrov3.sh +++ b/update-Nitrov3.sh @@ -65,7 +65,13 @@ echo "--> Building Emulator with Maven..." mvn package # Automatically detect the newly built .jar file -JAR_FILE=$(basename "$(ls -t target/Habbo-*-jar-with-dependencies.jar 2>/dev/null | head -n 1)") +JAR_PATTERN="target/Habbo-*-jar-with-dependencies.jar" +JAR_FILE=$(basename "$(ls -t $JAR_PATTERN 2>/dev/null | head -n 1)") + +if [ -z "$JAR_FILE" ]; then + echo "=== ❌ Geen jar-bestand gevonden met pattern: $JAR_PATTERN ===" + exit 1 +fi echo "--> Found jar file: $JAR_FILE" echo "--> Updating emulator launch file..."