-
Notifications
You must be signed in to change notification settings - Fork 13
✔️ Add version check on start #43
If there is a new release version, by using this gist it could be possible to display a warning for a new version.
Or just add a file version.ini that could be curl directly and compare to the local file:
function get_latest_version() { curl --silent "https://raw.githubusercontent.com/zebscripts/AFK-Daily/master/version.ini" # Get latest version file } function version_check() { if [ `cat version.ini` != `get_latest_version` ] ; then echo "[WARN] New version available, please download the last release." fi }
All reactions
Replies: 1 comment 3 replies
That is a very interesting gist, thank you for the share! Though I wonder why I'd want to use it? The script already checks if there is an update available, and automatically updates if possible.
All reactions
It's a secondary way to check if the user did not clone the repo, but downloaded the zip file, or use it in virtual environments without git installed.
All reactions
-
👍 1
Right, that does indeed make sense!
All reactions
Though for now, this will be a low priority as a check is implemented for those who do clone the repo. And since that is the intended way for anyone to install the script, I'm going to pretend they actually do so. If not, automatic updates is not an available feature for now.