Hey Bash-Geeks!
I have coded a small script (a few thousand lines) which some of my friends use to do a few things on their computers. Since I update the script at least once a month, I realize that it is quite difficult to distribute a new version of my script to everyone who is using an older version. Hence, I would like to add a method to do the following:
I know, I could just try for hours to code that now. And I could even crawl the interwebz for a few days. But maybe you're so kind to just tell me?
I have coded a small script (a few thousand lines) which some of my friends use to do a few things on their computers. Since I update the script at least once a month, I realize that it is quite difficult to distribute a new version of my script to everyone who is using an older version. Hence, I would like to add a method to do the following:
- Script checks for Internet connection (prompts error if not available, the quits)
- If Internet connection is avaialble, it checks for a new version of my script (non-public URL)
- If a new version of the script is available, it overwrites itself with the new version and tells the user
- If no newer version exists, it tells the user that it is the latest version and continues as usual
I know, I could just try for hours to code that now. And I could even crawl the interwebz for a few days. But maybe you're so kind to just tell me?