Skip to content

Navigation Menu

Sign in
Sign up
This repository was archived by the owner on Jul 2, 2023. It is now read-only.

✔️ Add version check on start #43

kevingrillet started this conversation in Ideas
Discussion options

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
}
You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

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.

You must be logged in to vote
3 replies
Comment options

kevingrillet Apr 21, 2021
Collaborator Author

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.

Comment options

Right, that does indeed make sense!

Comment options

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /