Skip to content

Instantly share code, notes, and snippets.

@kyzentun
Created April 5, 2017 18:14
Show Gist options
  • Save kyzentun/40c32478256eac786140a04454811910 to your computer and use it in GitHub Desktop.
Save kyzentun/40c32478256eac786140a04454811910 to your computer and use it in GitHub Desktop.
#!/bin/bash
# You must change '~/'stepmania to the actual path to your stepmania folder for this to work.
# '~/' is your home folder. '~/stepmania' is a folder named 'stepmania' inside your home folder.
cd ~/stepmania
# git stash commands are for people that edit the source and don't commit their changes or make pull requests
# Uncommand the git stash commands if you edit the source. If you commit local changes to a local branch, you probably know which git commands to use instead.
# git stash
# 5_1-new is the current 5.0.x semi-compatible branch.
git pull origin 5_1-new
# git stash pop
cd Build
if make -j4; then
# xmessage for a visual notification when done.
xmessage "Stepmania done compiling."
else
rm -r CMake* CPack* Makefile src
if CXXFLAGS='-O3 -fuse-ld=gold' cmake -G 'Unix Makefiles' -DWITH_FFMPEG_JOBS=1 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=YES .. && cmake ..; then
if make -j4; then
# xmessage for a visual notification when done.
xmessage "Stepmania compiled after rebuilding cmake cache."
else
xmessage "Compiling stepmania failed."
fi
else
xmessage "Running cmake after clearing cmake cache failed, bug a dev or something."
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment