diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index 23598c4..d6393f9 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -6,7 +6,7 @@ COMMIT_SOURCE="$2" BOOTSTRAPDIR="bootstrap" pkgfileloc="$(git rev-parse --show-toplevel)/$BOOTSTRAPDIR/packages.txt" pkgignoreloc="$(git rev-parse --show-toplevel)/$BOOTSTRAPDIR/packages_ignore.txt" -listgen="yay" +listgen="paru" err() { printf "\x1b[33mCAUTION:\x1b[0m %s\n" "$*" @@ -18,7 +18,7 @@ if [ ! -f "$pkgfileloc" ]; then fi if ! type "$listgen" >/dev/null 2>&1; then - err "Yay not installed on machine, can not reliably determine package differences!" + err "List generator not installed on machine, can not reliably determine package differences!" fi # get commited packages, remove empty lines @@ -30,7 +30,7 @@ sed -e '/^[#$]/d' <"$pkgfileloc" | sort >"$pkgcommited" # q removes extraneous info # e only lists explicitly installed # tt removes those that are depended on, but NOT those optionally depended on -pkgcurrent=$(yay -Qqett | sort) +pkgcurrent=$("$listgen" -Qqett | sort) # remove those listed in package_ignore.txt if [ -f "$pkgignoreloc" ]; then pkgcurrent=$(echo "$pkgcurrent" | comm -23 - "$pkgignoreloc") diff --git a/bootstrap/packages.txt b/bootstrap/packages.txt index 63ed0f8..2082b53 100644 --- a/bootstrap/packages.txt +++ b/bootstrap/packages.txt @@ -82,6 +82,7 @@ ntp os-prober pacman-contrib pandoc-citeproc +paru pass pavolume pdfjs @@ -151,7 +152,6 @@ xclip xorg-xev xorg-xinit xorg-xinput -yay youtube-dlc # zsh plugins diff --git a/scripts/.local/bin/syu b/scripts/.local/bin/syu deleted file mode 120000 index 76b3f31..0000000 --- a/scripts/.local/bin/syu +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/topgrade \ No newline at end of file diff --git a/sh/.config/sh/alias.d/syu.sh b/sh/.config/sh/alias.d/syu.sh new file mode 100644 index 0000000..d21d3fe --- /dev/null +++ b/sh/.config/sh/alias.d/syu.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env sh +# Updates your system using topgrade if it exists, +# falls back to paru or yay. +# If only pacman exists, will use that but whine about it + +# Also makes yay call paru since that is the new hotness +# (or at least I want to try it) + +type paru >/dev/null 2>&1 && { + alias yay=paru +} + +syu() { + type topgrade >/dev/null 2>&1 && { + topgrade + return + } + + type paru >/dev/null 2>&1 && { + paru + return + } + + type yay >/dev/null 2>&1 && { + yay + return + } + + type pacman >/dev/null 2>&1 && { + echo "Did not find paru, or yay installed. Updates will not be applied to aur packages." + sudo pacman -Syu + return + } +}