shell script to get the latest nightly (old)

  • I have an idea about the rpis, but I do not know if it will apply to other arm socs. The "uname -m" command returns armv7l on the rpi2 image. I assume it will return aarch64 or something like that for the rpi4 image.

    For the record, the 64bit version of lakka for rpi3 returns aarch64.

  • There you go.

  • FYI...

  • Not requested, but I run LE on a Pine64 Rock64 device:

    which may still help in learning about variations in /etc/os-release outputs

  • thanks diederik

    but sorry I guess I never will support those platforms.

    why ?

    look into nightly download directory and compare with your os-release.

    on the first you'll see a lot of "sub-variants" (?, the part between git tag and .img.gz) for .eg. 3328, but no such sub-variants in your os-release.

    therefore, with my script I (currently) can't figure out what sub-varaint your're running. I guess there is a way, but that seems - as a guy with a lack of doing *logical* programming smart - a sort of burden.

    numbers to backup this thesis:

    yesterday (?) I sat from 4 pm non-stop to 4 am at a new version of the script - with a lot of caffeine/nicotine - and it's not ready yet ...

    and I feel I'm getting old, earlier ~18 h nonstop wasn't a theme. When I have bitten in a task it goes nonstop until tiredness isn't "fixable" with further caffeine and lastely realizing that I repeat the same programming mistake over and over again ... :D

    Edited 3 times, last by GDPR-7 (June 15, 2022 at 5:06 PM).

  • but sorry I guess I never will support those platforms.

    That's quite alright :)

    Quote

    why ?

    look into nightly download directory and compare with your os-release.

    on the first you'll see a lot of "sub-variants" (?, the part between git tag and .img.gz) for .eg. 3328, but no such sub-variants in your os-release.

    Knowing that it's not automatically applicable to all devices, is useful to know.

    I don't know a way to differentiate those sub-variants programmatically either.

    Quote

    and I feel I'm getting old, earlier ~18 h nonstop wasn't a theme. When I have bitten in a task it goes nonstop until tiredness isn't "fixable" with further caffeine and lastely realizing that I repeat the same programming mistake over and over again ... :D

    One of the best and often underappreciated 'debugging' techniques, is taking a break/nap or plainly a good nights sleep ;)

  • ...

    One of the best and often underappreciated 'debugging' techniques, is taking a break/nap or plainly a good nights sleep ;)

    Hhhmm, "collides" with getting work done. ;)

    anyway:

    a new version of my script is under comment #1.

    and needs testing and I'm quiet sure "optimization"

    anyone ?

    P.S.

    now comes the nap ...

  • a new version of my script is under comment #1.

    and needs testing and I'm quiet sure "optimization"

    anyone ?

    Tested with all options "u, d, q" and all works like expected.

    there is just this error message without consequence :

    anyway thanks for your works.

  • Nanomani thanks for testing and reporting.

    could please un-comment the variable DEBUG=0; in line 49

    it should read then

    # DEBUG=0;

    and it then print out some debug info's.

    also remove the "#" at line 226

    and run the script again

    what does it print out at:

    ...

    compressed image size is:

    ...

    is there a value or nothing ?

    I guess my mistake is that I forgot to un-comment line 226 and after a test here it seems to be the fix (will change that in comment #1)

    Edited 4 times, last by GDPR-7 (June 17, 2022 at 6:46 PM).

  • thanks Nanomani

    is this still *after* un-commenting line 226 ?

    I fixed the code in comment #1

    and if it's fixed then (it should !): switch Debug OFF again (line 49), otherwise *no* nightly downloads will happen !

    already 3 h ago I changed/tested the script here, it now does what it should do

    - hopefully without bugs I'm currently not aware of [developers sorrows :sick: ] -

    Edited 2 times, last by GDPR-7 (June 17, 2022 at 8:59 PM).

  • thanks Nanomani

    is this still *after* un-commenting line 226 ?

    I fixed the code in comment #1,

    in case you can't edit the script you currently own: download it again

    Sorry i read too fast. I had not seen that part ...

    You are right with this line "226 " uncommented all works like a charm now.
    Thanks again :)

  • regarding "fast reading": DEBUG is also set as in comment #1 ?

    Yes.

    Tested also your lastest version 0.05 from scratch.

    This mean :

    - I have delete my file "get_nightly.sh"

    - I have create a new one with the new code (v 0.05) in the first post

    all is good.

  • Thanks for your work, I have quickly tested the script on RPi 4B and it works in general, but there are some disadvantages I would like to mention:

    - when the download is aborted for some reason, deletion of partially downloaded image is a bad behaviour from my point of view, a better choice should be to use the wget -c so the running script again could continue downloading the rest of the file.

    - the script does not detect the upgrade image (but as a downgrade instead) when there are several images released the same day, like yesterday. FYI there's a folder content & debug output including index.html below:

    LibreELEC Nightly Builds: /11.0/RPi/

    Type to search...

    File Name ↓ File Size ↓ Date ↓

    Parent directory/

    - -

    LibreELEC-RPi2.arm-11.0-nightly-20220618-b78941a.img.gz

    120.9 MiB 2022-Jun-18 09:29

    LibreELEC-RPi2.arm-11.0-nightly-20220618-fa73826.img.gz

    120.9 MiB 2022-Jun-18 23:19

    LibreELEC-RPi4.arm-11.0-nightly-20220618-b78941a.img.gz

    122.8 MiB 2022-Jun-18 10:57

    LibreELEC-RPi4.arm-11.0-nightly-20220618-fa73826.img.gz

    122.8 MiB 2022-Jun-18 23:56

    # ./get_nightly.sh

    +++ Debug Info +++

    your Platform is: RPi4.arm

    build date is : 20220618

    Git Tag is: b78941a


    +++ Debug Info +++

    using download URL: https://test.libreelec.tv/11.0/RPi/


    +++ Debug Info +++

    in function check_available_Images


    +++ Debug Info +++

    wget return code was: 0


    <!DOCTYPE html>

    <html>

    <head>

    <meta charset="utf-8">

    <meta http-equiv="x-ua-compatible" content="IE=edge">

    <title>LibreELEC Nightly Builds</title>

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="/autoindex/styles.css">

    <!--<script src="/autoindex/jquery-3.6.0.min.js"></script>-->

    </head>

    <body>

    <!--

    header.html

    © 2015-18, Lilian Besson (Naereen) and contributors,

    open-sourced under the MIT License, https://lbesson.mit-license.org/

    hosted on GitHub, https://GitHub.com/Naereen/Nginx-Fancyindex-Theme

    -->


    <div class="nav_bar_out">

    <div class="nav_bar">

    <a class="menu" href="https://forum.libreelec.tv/">Forum</a>

    <a class="menu" href="https://libreelec.tv/">Blog</a>

    <a class="menu" href="https://libreelec.tv/about/">About</a>

    <a class="menu" href="https://libreelec.tv/downloads/">Stable-Downloads</a>

    <a class="menu" href="https://libreelec.wiki/">Wiki</a>

    </div>

    </div>

    <div class="out_logo">

    <div class="logo">

    <a href="https://test.libreelec.tv/"><img src="/autoindex/le-logo.png"style="width: 278px;height: 80px"></a>

    </div>

    </div>

    <div class="wrapper">

    <h4><div align="justify">This folder contains images and add-ons built from development snapshots and pull requests.

    You should expect to find bugs and other random problems.

    Feedback is welcome <a href="https://forum.libreelec.tv">via the forum</a>, but please do not expect support.

    Images are built nightly if there are changes to build. No new commits = no new images!

    </div></h4>

    <div>

    <h1>LibreELEC Nightly Builds:

    /11.0/RPi/</h1>

    <table id="list"><thead><tr><th style="width:55%"><a href="?C=N&O=A">File Name</a>&nbsp;<a href="?C=N&O=D">&nbsp;&WCF_AMPERSAND↓&nbsp;</a></th><th style="width:20%"><a href="?C=S&O=A">File Size</a>&nbsp;<a href="?C=S&O=D">&nbsp;&WCF_AMPERSAND↓&nbsp;</a></th><th style="width:25%"><a href="?C=M&O=A">Date</a>&nbsp;<a href="?C=M&O=D">&nbsp;&WCF_AMPERSAND↓&nbsp;</a></th></tr></thead>

    <tbody><tr><td><a href="../">Parent directory/</a></td><td>-</td><td>-</td></tr><tr><td><a href="LibreELEC-RPi2.arm-11.0-nightly-20220618-b78941a.img.gz" title="LibreELEC-RPi2.arm-11.0-nightly-20220618-b78941a.img.gz">LibreELEC-RPi2.arm-11.0-nightly-20220618-b78941a.img.gz</a></td><td>120.9 MiB</td><td>2022-Jun-18 09:29</td></tr>

    <tr><td><a href="LibreELEC-RPi2.arm-11.0-nightly-20220618-fa73826.img.gz" title="LibreELEC-RPi2.arm-11.0-nightly-20220618-fa73826.img.gz">LibreELEC-RPi2.arm-11.0-nightly-20220618-fa73826.img.gz</a></td><td>120.9 MiB</td><td>2022-Jun-18 23:19</td></tr>

    <tr><td><a href="LibreELEC-RPi4.arm-11.0-nightly-20220618-b78941a.img.gz" title="LibreELEC-RPi4.arm-11.0-nightly-20220618-b78941a.img.gz">LibreELEC-RPi4.arm-11.0-nightly-20220618-b78941a.img.gz</a></td><td>122.8 MiB</td><td>2022-Jun-18 10:57</td></tr>

    <tr><td><a href="LibreELEC-RPi4.arm-11.0-nightly-20220618-fa73826.img.gz" title="LibreELEC-RPi4.arm-11.0-nightly-20220618-fa73826.img.gz">LibreELEC-RPi4.arm-11.0-nightly-20220618-fa73826.img.gz</a></td><td>122.8 MiB</td><td>2022-Jun-18 23:56</td></tr>

    </tbody></table> <div id="raw_include_README_md"></div>

    <script src="/autoindex/xregexp-5.1.0.js"></script>

    <script src="/autoindex/addNginxFancyIndexForm.js"></script>

    </body>

    </html>

    <!--

    footer.html

    © 2015-18, Lilian Besson (Naereen) and contributors,

    open-sourced under the MIT License, https://lbesson.mit-license.org/

    hosted on GitHub, https://GitHub.com/Naereen/Nginx-Fancyindex-Theme

    -->

    previous nightly on the Download Server is: LibreELEC-RPi4.arm-11.0-nightly-20220618-fa73826.img.gz

    it's compressed download size is: 122 MiB


    your Platform is: RPi4.arm

    running nightly is from: 20220618

    and has Git Tag: b78941a


    +++ nightlies currently available on the download server +++

    * for an update: *** No updates ***

    * for an downgrade: LibreELEC-RPi4.arm-11.0-nightly-20220618-fa73826.img.gz


    What do you want me to do ?

    u) update your nightly to the lastest.)

    d) downgrade to the previous nightly

    q) quit (auto. selected in 15 seconds !!!)


    Enter selection [u, d, q] > u


    update was selected


    +++ Debug Info +++

    in function check_disk_space

    Selected Image wasn't available !

    Aborting !!!


    +++ in clean up +++