Skip to content

Commit

Permalink
Add several improvements to updater script
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhinham committed Apr 1, 2022
1 parent 787fa2a commit 41b0e0c
Show file tree
Hide file tree
Showing 3 changed files with 331 additions and 221 deletions.
10 changes: 6 additions & 4 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ A wrapper script ([`mt32pi_updater.sh`]) is provided so that it can be launched

### Features

- Self-updating.
- Connects to your mt32-pi via FTP and compares the installed version with the latest version available on GitHub.
- Exits early if your mt32-pi is up-to-date.
- Shows the release notes for a few seconds before updating.
Expand All @@ -51,13 +52,14 @@ A wrapper script ([`mt32pi_updater.sh`]) is provided so that it can be launched

### Usage

1. Download [`mt32pi_updater.py`].
- If you want to use it on MiSTer, download the [the wrapper script][`mt32pi_updater.sh`] too, and copy both scripts (`.py` and `.sh`) to the `/Scripts` directory on your SD card.
2. Make the scripts executable by typing `chmod +x mt32pi_updater.{py,sh}` at a shell prompt.
3. If you have set a custom hostname, IP address or FTP username/password in `mt32-pi.cfg`, edit the `MT32PI_FTP_HOST`, `MT32PI_FTP_USERNAME` and `MT32PI_FTP_PASSWORD` settings near the top of `mt32pi_updater.py` so that they match.
1. Download [`mt32pi_updater.py`] and [`mt32pi_updater.cfg`].
- If you want to use it on MiSTer, download the [the wrapper script][`mt32pi_updater.sh`] too, and copy both scripts (`.py` and `.sh`) and the `.cfg` file to the `/Scripts` directory on your SD card.
2. Make the script(s) executable by typing `chmod +x mt32pi_updater.{py,sh}` at a shell prompt.
3. If you have set a custom hostname, IP address or FTP username/password in `mt32-pi.cfg`, edit the `host`, `ftp_username` and `ftp_password` settings inside `mt32pi_updater.cfg` so that they match.
4. Run the script by typing `./mt32pi_updater.py` at a shell prompt.
- On MiSTer, you should see `mt32pi_updater` in the Scripts menu - simply select it to run the script.

[`mt32pi_installer.sh`]: mt32pi_installer.sh?raw=1
[`mt32pi_updater.py`]: mt32pi_updater.py?raw=1
[`mt32pi_updater.cfg`]: mt32pi_updater.cfg?raw=1
[`mt32pi_updater.sh`]: mt32pi_updater.sh?raw=1
25 changes: 25 additions & 0 deletions scripts/mt32pi_updater.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[updater]

# Your mt32-pi's hostname or IP address
host = mt32-pi

# The FTP username/password as specified in mt32-pi.cfg
ftp_username = mt32-pi
ftp_password = mt32-pi

# FTP connection timeout (seconds); try increasing this value if your network
# isn't very reliable
connection_timeout = 5

# Comma-separated list of paths within the update package to ignore;
# trailing slash indicates entire directory
ignore_list = roms/, soundfonts/

# Set this to off to prevent this script from updating itself
self_update = on

# Set this to on to skip the mt32-pi version check and update anyway
force_update = off

# Set this to off to skip showing the release notes
show_release_notes = on
Loading

0 comments on commit 41b0e0c

Please sign in to comment.