#!/bin/sh set -e # verify this is for us or exit gracefully if [ "$(readlink '/system-update')" != '/var/cache/pacman/pkg' ]; then exit 0 fi # remove triggering symlink rm -f /system-update # install updates pacman --sync --noconfirm --needed archlinux-keyring pacman --sync --noconfirm --sysupgrade # clean up package cache pacman --sync --noconfirm --clean # reboot systemctl reboot