From 32c44d84d8b5b8ffbf9fd367138daa23ff87725f Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Sun, 22 Feb 2026 08:06:51 +0100 Subject: [PATCH] Change comments to include some dashes for better readability --- arch_update | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch_update b/arch_update index 9bae340..de025b8 100755 --- a/arch_update +++ b/arch_update @@ -3,7 +3,7 @@ BACKUP_LIMIT=3 -# Check dependencies +# ---------------- Check dependencies ---------------- echo -e '\nInstalling dependencies ...' >&2 if ! which yay >/dev/null 2>&1; then git clone https://aur.archlinux.org/yay.git @@ -15,12 +15,12 @@ fi yay -S --needed --noconfirm curl git neovim pacman-contrib yaycache [ ! -e /usr/local/bin/vim ] && sudo ln -s /usr/bin/nvim /usr/local/bin/vim -# Display updates beforehand +# ---------------- Display updates beforehand ---------------- echo -e '\nChecking for updates ...' >&2 checkupdates yay -Qua -# Ask to proceed +# ---------------- Ask to proceed ---------------- while true; do echo -e '\nDo you want to start the update? Y/n' >&2 read -r answer || exit 1 @@ -38,7 +38,7 @@ while true; do esac done -# Backup system +# ---------------- Backup system ---------------- if which btrfs >/dev/null 2>&1; then yay -S --needed --noconfirm snapper [ ! -f /etc/snapper/configs/root ] && sudo snapper -c root create-config / @@ -48,25 +48,25 @@ if which btrfs >/dev/null 2>&1; then sudo snapper -c root create -c number fi -# Update mirrors +# ---------------- Update mirrors ---------------- echo -e '\nUpdating mirrors ...' >&2 curl -s 'https://archlinux.org/mirrorlist/?country=DE&protocol=https&use_mirror_status=on' | sed -e 's/^#\(Server\)/\1/' -e '/^#/d' | rankmirrors - | sudo tee /etc/pacman.d/mirrorlist -# Update system +# ---------------- Update system ---------------- echo -e '\nUpdating system ...' >&2 yay -Syu --noconfirm -# Remove orphans +# ---------------- Remove orphans ---------------- echo -e '\nRemoving orphans ...' >&2 orphans=$(yay -Qtdq) [ ! "X$orphans" = 'X' ] && yay -Rns --noconfirm $orphans -# Clean cache +# ---------------- Clean cache ---------------- echo -e '\nCleaning cache ...' >&2 sudo paccache -r yaycache -r -# Update flatpaks +# ---------------- Update flatpaks ---------------- if which flatpak >/dev/null 2>&1; then echo -e '\nUpdating flatpaks ...' >&2 flatpak update