Created
November 17, 2023 23:19
-
-
Save JanJastrow/077d528146ad4e13b255647fd2b366e3 to your computer and use it in GitHub Desktop.
Polished Crystal 9bit Build Script
This file contains 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 | |
cd /root/polishedcrystal | |
WEB="/var/www/html" | |
# Update branch & clean | |
COMMIT_ID_BEFORE=$(git rev-parse HEAD | cut -c 1-8) | |
git pull | |
git checkout 9bit | |
COMMIT_ID_AFTER=$(git rev-parse HEAD | cut -c 1-8) | |
if [ $COMMIT_ID_BEFORE != $COMMIT_ID_AFTER ]; then | |
# Clean | |
rm *-beta.gbc | |
rm *-beta.sym | |
rm *-beta.map | |
make clean | |
# Remove old version from web folder | |
rm $WEB/*.gbc | |
rm $WEB/*.sym | |
rm $WEB/*.map | |
# Build the roms | |
VARIATIONS=("crystal" "debug" "faithful" "faithful debug" "nortc" "faithful nortc") | |
for VARIATION in "${VARIATIONS[@]}"; do | |
make $VARIATION | |
# Rename files | |
for file in polishedcrystal*3.0.0-beta.*; do | |
new_name="${file%.*}_9bit-$COMMIT_ID_AFTER.${file##*.}" | |
mv "$file" "$new_name" | |
done | |
mv *.gbc $WEB/ | |
mv *.map $WEB/ | |
mv *.sym $WEB/ | |
make tidy | |
done | |
fi | |
# Update last-modified date | |
touch $WEB/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment