アルクシン

Void-Updater (archived)

I don't use and maintain this utility anymore, so it could be obsolete.

Don't launch scripts with "sh" prefix, some commands won't work because of the default shell.
(sudo) sh /path/to/script.sh -> is wrong
(sudo) /path/to/script.sh -> is right
cd /path/to/ && (sudo) ./script.sh -> is right

This tool shows number of available updates and asks if you want to apply them. At first glance it looks like a duplicate of "void-wizard.sh" script detailed above, but "void-updater" was mainly created to be connected with a service which, by default, checks every six hours at every sunday then send a notification if there are new packages.

If you prefer something lighter and simpler, take a look at the "Xfce updates plugin" chapter.

Of course you can use "octoxbps" instead which is Void's (unofficial) graphical utility in Qt to manage packages and receive notifications. OctoXBPS is available in repos and usage is the same than Manjaro's Octopi.

Required packages: lynx snooze zenity. Edit paths if you don't put your scripts at the same place than me.

Main script

Change "XTRM" variable if your terminal isn't Xfce's.

/usr/local/bin/void-scripts/void-updater.sh - executable: yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux ### Required packages: sudo xbps-install -S lynx zenity readonly AVUP=$(xbps-install -nuM | wc -l) readonly XTRM=xfce4-terminal if [ ! -d ~/.snooze/ ]; then mkdir ~/.snooze/ fi date +%c > ~/.snooze/updater if [ $AVUP -gt 0 ]; then zenity --title="Void Updates" --name="Void Updates" --question --width=280 --height=140 --ok-label="Yes" --cancel-label="No" \ --window-icon="/usr/share/icons/Papirus/64x64/apps/distributor-logo-void.svg" --icon-name="system-software-update" \ --text "$AVUP update(s) available.\nDo you want to proceed?" if [ $? = 0 ]; then $XTRM -x '/usr/local/bin/void-scripts/execute.sh' else exit 0 fi else exit 0 fi

Auxiliary script

/usr/local/bin/void-scripts/execute.sh - executable: yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux printf "Known manual interventions:\n\n" if [ $(lynx -dump -nolist https://voidlinux.org/news/archive.html | grep -i "intervention" | wc -l) -eq 0 ]; then printf "None" && sleep 1s else lynx -dump -nolist https://voidlinux.org/news/archive.html | grep -i "intervention" printf "\n" read -p "Visit news page for more details? [Y/n] " a if [ "$a" = "Y" ] || [ "$a" = "y" ]; then lynx https://voidlinux.org/news/archive.html fi fi clear sudo xbps-install -Su | sudo tee /var/log/xbps-update.log date | sudo tee -a /var/log/xbps-update.log printf "System updated!\n" printf "Log file available at \'/var/log/xbps-update.log\'.\n\n" read -p "Press ENTER to close. "

Launcher

/usr/local/share/applications/void-updater.desktop - executable: yes (chmod +x)
Show/Hide [Desktop Entry] Type=Application Name=Void Updater Comment=Updates notification Exec=/usr/local/bin/void-scripts/void-updater.sh Icon=system-software-update Terminal=false Categories=System;

Service

WARNING! It seems to work, but I don't master "snooze" yet and didn't test longer enough. You could meet some weird behaviour, it's a "Work-In-Progress". However, there shouldn't be any serious damage.

If you have some improvements or fixes to submit, please send me a message on Reddit or an email.

Don't forget to change "xfce4-session" if you don't use Xfce, and every "alex" occurencies with your username.

/etc/sv/void-updater/run - executable: yes (chmod +x)
Show/Hide #!/bin/sh if pgrep -x xfce4-session > /dev/null then export DISPLAY=:0 export XAUTHORITY="/home/alex/.Xauthority" exec snooze -w0 -H/6 -t /home/alex/.snooze/updater \ chpst -u alex:alex /usr/local/bin/void-scripts/void-updater.sh else sleep 5m sv reload void-updater fi

sudo chmod 755 /etc/sv/void-updater/run
sudo ln -s /etc/sv/void-updater /var/service/