Fix: check if jar exists after mvn package, clear error message

This commit is contained in:
root
2026-06-05 23:03:47 +02:00
parent af2f76d9db
commit f109b1f764
+7 -1
View File
@@ -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..."