chamesle

chamesle.org: the site of Chamesle, a small Linux distribution
git clone https://github.com/tortr-rs/chamesle
Log | Files | Refs | README

chamesle-refresh (987B)


      1 #!/bin/sh
      2 # keeps apk's package list and fwupd's firmware list fresh so the store and the update notifier (running as you)
      3 # can see what's new, and installs updates when that's on (chamesle-auto-update)
      4 # nothing to do in the live session, but stay up so dinit doesn't keep restarting us
      5 [ -e /run/chamesle-live ] && exec sleep infinity
      6 sleep 120
      7 # the firmware the installer left for later (hardware this computer doesn't have), once
      8 if [ -s /etc/chamesle/trimmed ] && [ -x /usr/libexec/chamesle-get ]; then
      9     /usr/libexec/chamesle-get "fix --reinstall $(cat /etc/chamesle/trimmed)" >/dev/null 2>&1 && rm /etc/chamesle/trimmed
     10 fi
     11 while :; do
     12     # the nvidia driver got updated: flatpak's part of it follows
     13     [ -x /usr/libexec/chamesle-nvidia-flatpak ] && /usr/libexec/chamesle-nvidia-flatpak >/dev/null 2>&1
     14     apk update --quiet >/dev/null 2>&1
     15     [ -x /usr/bin/fwupdmgr ] && fwupdmgr refresh --force >/dev/null 2>&1
     16     /usr/libexec/chamesle-auto-update
     17     sleep 21600
     18 done