Sample Header Ad - 728x90

Self update bash script if there are any updates first then continue on, with Git

2 votes
2 answers
2844 views
I'm trying to add the ability for my ArchLinux installer script to check if it's update-to-date based on rather it matches (or doesn't match) the version number that's on gitlab. The primary script that runs the installer (and all of the numbered script files) is the aalis.sh script, it basically goes and runs the other files together. The version numbering would be something like 1.2.3 (major.minor.patch). Basically, whenever I make any changes to the script, I will change the script's version number of gitlab; and I want the script itself to be able to detect that its version number doesn't the match the one on github (for cases where someone has an outdated version of the script and try to run it); and automatically update itself using git fetch origin master then rerun itself using the updated contents.
Asked by Nova Leary (43 rep)
Jan 2, 2022, 01:00 AM
Last activity: Jul 24, 2025, 06:06 PM