as a command line user I wrote a shell script to download nightlies for updates/downgrades
script supports the newer directory structure on the nightly download server and LE 11 nightlies.
What is does
- reads out /etc/os-release to get the nightly variant from your currently running LE box
- checks the download server for last (for updates) and previous (for downgrades) nightlies
where "updates" means: to the newest on the download server (in one step ! I don't know if that always work out)
where "downgrades" means: one nightly down related to the currently running
- checks need disk space (min. ~549 MB) what the update installer needs
and only when okay it does the next 2 steps:
- downloads the choosen nightly Image from the download server and places it under ~/.update
- offers to reboot
What it doesn't do
- does (currently) NOT support boxes which are NOT Generic, Generic-legacy, RPi2, RPi4
- does NOT support switching between Generic and Generic-legacy nightlies
Requirements
- always run the lastest script version.
- you need at least a nightly on your LE box what is also currently available on the download server (URL: please see script line 44: "SERVER"), otherwise the script aborts !
Background: if the script can't find your running nightly on the download server it can't decide what is the update/downgrade related to your box.
HowTo
1. download via webbrowser from here:
2. https://gist.github.com/eldersixpack13
- don't be confuse: eldersixpack13 and JoeAverage are the same (idiot)"
3. unzip the downloaded file
4. place the get_nightly.sh on your LE box somewhere, but NOT in ~/.update or /tmp
5. to make the script executable run on linux (only once) :
chmod u+x get_nightly.sh
starting the script
- ssh into the LE box
- move to the folder where the script is stored
- run the script via command:
./get_nightly.sh
(for inexperienced linux users: it reads "./..."; (point slash ...)
Be aware:
- native tested is only Generic here (Generic-legacy and RPi* with dummy files only !)
- script might contain "plain ol' men's thinkO's" and therefore Bugs
- NO WARRANTY by me and use at you own risk.
comments, bug reports, etc. are welcome.
Coding-Hints
- shell check analyse tool reports some minor (?) problems, I'm aware of...
- piping the script through the tool "shfmt" and compare the original with the tool "meld" shows nearly the same, apart from the semicolon I use.
- IIRC, I've learned it that way on Unix System V 30 years ago or might mix it with C programming.
Anyway, to me it looks saner ending command lines with ";" -
To remove the semicolons, you might use the following command line "cat <script-name> | shfmt > <output-name>"
Changelog
Version 0.10
- today (24.07.2020) adjusted the server URL at line 44
- initial release for the new (but tentatively) download server structure