Created
November 24, 2025 18:39
-
-
Save v1605/3aad3aa1478169f8363bb7bc986267f4 to your computer and use it in GitHub Desktop.
Mister N64 Turbo Core updater
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #---------------------Config---------------------------------------------------- | |
| API_URL="https://api.github.com/repos/MiSTer-devel/N64_MiSTer/contents/releases_turbo" | |
| DEST_DIR="/media/fat/_Console" | |
| RUN_UPDATE_ALL=true | |
| #---------------------End------------------------------------------------------- | |
| echo "---- Updating N64 Turbo Core ----" | |
| mkdir -p "$DEST_DIR" | |
| # Fetch file info from GitHub | |
| JSON=$(curl -k -s "$API_URL") | |
| if [ -z "$JSON" ]; then | |
| echo "ERROR: Could not fetch GitHub file list." | |
| exit 1 | |
| fi | |
| # Get latest file name | |
| RBF_FILES=($(echo "$JSON" | grep '"name":' | grep '.rbf' | cut -d '"' -f 4 | sort)) | |
| if [ ${#RBF_FILES[@]} -eq 0 ]; then | |
| echo "ERROR: No .rbf files found in releases_turbo." | |
| exit 1 | |
| fi | |
| LATEST_FILE="${RBF_FILES[-1]}" | |
| LATEST_URL="https://raw.githubusercontent.com/MiSTer-devel/N64_MiSTer/main/releases_turbo/$LATEST_FILE" | |
| FINAL_PATH="$DEST_DIR/$LATEST_FILE" | |
| # Check if latest core is already installed | |
| if [ -f "$FINAL_PATH" ]; then | |
| echo "Already up-to-date." | |
| else | |
| echo "Installing new core" | |
| rm -f "$DEST_DIR"/N64_80MHz_*.rbf | |
| echo "Downloading $LATEST_FILE..." | |
| curl -k -L -s -o "$FINAL_PATH" "$LATEST_URL" | |
| if [ $? -ne 0 ]; then | |
| echo "ERROR: Download failed!" | |
| exit 1 | |
| fi | |
| echo "Installed: $FINAL_PATH" | |
| fi | |
| # Run update_all | |
| if [ "$RUN_UPDATE_ALL" = true ]; then | |
| echo "Running update_all..." | |
| /media/fat/Scripts/update_all.sh | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment