38 lines
873 B
Bash
Executable file
38 lines
873 B
Bash
Executable file
#!/bin/sh
|
|
|
|
printf "Beginning upgrade.\\n"
|
|
if command -v paru 1>/dev/null 2>&1; then
|
|
paru -Syu
|
|
elif command -v yay 1>/dev/null 2>&1; then
|
|
yay -Syu
|
|
elif command -v pacman 1>/dev/null 2>&1; then
|
|
pacman -Syu
|
|
fi
|
|
|
|
command -v apt 1>/dev/null 2>&1 && sudo apt upgrade
|
|
|
|
# This pkill is already handled by apt/pacman hooks:
|
|
# pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
|
|
|
|
# apt
|
|
# create the file /etc/apt/apt.conf.d/80statusbar containing the following
|
|
|
|
# DPkg::Post-Invoke {"/usr/bin/pkill -RTMIN+8 dwmblocks";};
|
|
|
|
|
|
|
|
# pacman
|
|
# create the file /usr/share/libalpm/hooks/statusbar.hook containing the following
|
|
|
|
# [Trigger]
|
|
# Operation = Upgrade
|
|
# Type = Package
|
|
# Target = *
|
|
# [Action]
|
|
# Description = Updating statusbar...
|
|
# When = PostTransaction
|
|
# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks
|
|
|
|
printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
|
|
read -r _
|
|
exit
|