minicraft_launcher/launcher.sh
justuser d1d2a2c252 up
2025-01-29 16:49:13 +03:00

20 lines
601 B
Bash
Executable File

#!/bin/bash
# Check if minicraft.jar exists
if [ -f "minicraft.jar" ]; then
echo "minicraft.jar found."
else
echo "minicraft.jar not found. Downloading the latest version..."
# Fetch the latest release information from GitHub
latest_release=$(curl -s https://api.github.com/repos/MinicraftPlus/minicraft-plus-online/releases/latest | grep "browser_download_url.*minicraft_plus-.*\.jar" | cut -d '"' -f 4)
# Download the latest version of minicraft_plus.jar
wget -O minicraft.jar $latest_release
echo "Download complete."
fi
# Run minicraft.jar
java -jar minicraft.jar