This is a shell script for compiling and updating FlashGBX on macOs, resulting in a "native" application that is also easy to update.
Precompiled binaries can also be downloaded from releases, if you don't want to bother with the script.
FlashGBX official repo: https://github.com/lesserkuma/FlashGBX/
- Python
- Pyinstaller
pip install -U pyinstaller
- Download flashgbx.sh and put it in a folder for sourcing shell scripts. I have put mine in
- Source the file in your .zshrc
- Source .zshrc or restart your terminal
Run the script in your preferred terminal with the command "updateFlashGBX"
I put my script in ~/.config/zsh/functions and I'm sourcing all shell scripts in this folder with the following command in my .zshrc script
for file in ~/.config/zsh/functions/*.sh; do
source "$file"
done
The script
- Checks the version of the current installation (if any), and compares it to latest release in the official repo using githubs api.
- If a new version is available, it clones the repo to a .tmp folder, and checks out the commit associated with the latest release.
- Using pyinstaller, the script creates a mac application
- Then update the app to have the correct version number with plutil
- And finally it overwrites the current installation with rsync