2022-07-04 21:36:33 +02:00
|
|
|
#!/bin/sh
|
2023-02-09 14:49:10 +01:00
|
|
|
|
2023-05-29 22:20:46 +02:00
|
|
|
BOLD='\033[1m'
|
|
|
|
BLUE='\033[34m'
|
|
|
|
NC='\033[0m'
|
2023-05-25 18:58:01 +02:00
|
|
|
# This pkill is already handled by apt/pacman hooks:
|
|
|
|
# pkill -RTMIN+8 "${STATUSBAR:-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
|
|
|
|
|
2023-05-29 22:20:46 +02:00
|
|
|
printf "%b" "$BOLD${BLUE}Beginning upgrade.$NC\n"
|
2023-02-09 14:49:10 +01:00
|
|
|
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
|
|
|
|
|
2023-05-25 18:58:01 +02:00
|
|
|
# apt -----------------------------------------------------------------------------
|
2023-02-20 12:23:39 +01:00
|
|
|
# create the file /etc/apt/apt.conf.d/80statusbar containing the following
|
2023-04-12 11:37:10 +02:00
|
|
|
|
2023-02-20 12:23:39 +01:00
|
|
|
# DPkg::Post-Invoke {"/usr/bin/pkill -RTMIN+8 dwmblocks";};
|
2023-04-12 11:37:10 +02:00
|
|
|
|
2023-05-25 18:58:01 +02:00
|
|
|
command -v apt 1>/dev/null 2>&1 && sudo apt upgrade
|
2023-04-12 11:37:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-25 18:58:01 +02:00
|
|
|
# void ----------------------------------------------------------------------------
|
|
|
|
# Void doesn't have post-install hooks at all, and including pkills in the package hooks isn't feasible
|
|
|
|
# Instead pkill is called in this script. Manually running updates will cause the status bar to desync
|
|
|
|
|
|
|
|
command -v xbps-install 1>/dev/null 2>&1 && sudo xbps-install -Syu && pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
|
2023-02-20 12:23:39 +01:00
|
|
|
|
2023-05-29 22:20:46 +02:00
|
|
|
printf "%b" "$BOLD${BLUE}Updating arkenfox...$NC\n"
|
2023-05-31 11:27:31 +02:00
|
|
|
"$DOTFILES_DIR/.local/share/firefox/updater.sh" -sb
|
2023-05-29 22:20:46 +02:00
|
|
|
|
|
|
|
printf "%b" "$BOLD${BLUE}Upgrade complete.\nPress <Enter> to exit window.\n"
|
2023-02-09 14:49:10 +01:00
|
|
|
read -r _
|
2023-02-20 12:23:39 +01:00
|
|
|
exit
|