update-notifier/install.sh

27 lines
593 B
Bash
Executable File

#!/bin/sh
_user_id=$(id -u)
if [ "$_user_id" -eq 0 ] ; then
echo "pacman-update-count.sh: error - must be run as normal user, not root"
exit 1
fi
sudo cp ./notify-updates /usr/local/bin/
sudo cp ./pacman-update-count /usr/local/bin/
sudo cp ./pacman-update-count.* /etc/systemd/system/
mkdir -p ~/.config/systemd/user
cp ./update-notifier.* ~/.config/systemd/user
sudo systemctl daemon-reload
sudo systemctl enable pacman-update-count.timer
sudo systemctl start pacman-update-count.timer
systemctl --user enable update-notifier.timer
systemctl --user start update-notifier.timer