Clean up old .jar files after emulator update keeping only the latest

This commit is contained in:
root
2026-06-07 16:51:22 +02:00
parent 618615a8b1
commit 2f363eb106
+4
View File
@@ -187,6 +187,10 @@ fi
echo "--> Cleaning Yarn cache..." echo "--> Cleaning Yarn cache..."
yarn cache clean 2>/dev/null || true yarn cache clean 2>/dev/null || true
# 4. Remove old .jar files, keeping only the newest one
echo "--> Cleaning up old emulator .jar files (keeping the latest)..."
ls -t "$EMULATOR_DIR/Emulator/target"/Habbo-*-jar-with-dependencies.jar 2>/dev/null | tail -n +2 | xargs -r rm -f || true
# ---------------------------------------- # ----------------------------------------
# 6. Fix Permissions (www-data) # 6. Fix Permissions (www-data)