Now that v0.10 is missing in action, I tried to create a much much simpler script that would just download the latest available nightly in the .update folder. And since my scripting abilities are weak, I decided to provide the commit name by hand, i.e. the script will ask the user to enter it manually.
But I am having issues getting the date part. On my end, new nightlies (99% of the time) have yesterday's date, e.g. right now its 20220719 on my end and the latest nightly is from 20220718.
Getting that date on my pc is easy peasy
$ date --date=yesterday +%Y%m%d
20220718
But on le, where date is part of busybox, the above is not doable, although it supposedly supports the --date parameter!
# date --date=yesterday +%Y%m%d
date: invalid date 'yesterday'
# date --help
BusyBox v1.32.1 (2022-07-18 22:30:02 UTC) multi-call binary.
Usage: date [OPTIONS] [+FMT] [TIME]
...
-d,--date TIME Display TIME, not 'now'
...
There is a workaround for it that simply gets today's date output from %s and substracts 84600 seconds so as to get yesterday's date. This is the only documented solution I have found, which does get it right when using seconds, but I can not get it to output the date as I said above!
# date -D %s -d $(( $(date +%s) - 86400 ))
Mon Jul 18 09:02:11 EEST 2022
# date -D %Y%m%d -d $(( $(date +%s) - 86400 ))
date: invalid date '1658124175'