diff --git a/README.md b/README.md index 4d7a455..c1239e1 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The packages are automatically updated periodically, you'll see ***aurto*** updates in the same way as other repos after a `pacman -Syu`. # Useful commands -View the contents of the ***aurto*** repo, _you may want to `pacman -Sy` first if recently changed_. +View the contents of the ***aurto*** repo. ```sh pacman -Sl aurto ``` diff --git a/bin/aurto b/bin/aurto index 89f89fb..371cf6d 100755 --- a/bin/aurto +++ b/bin/aurto @@ -6,8 +6,10 @@ command=${1:-} arg1=${2:-} if [ "$command" == "add" ] && [ -n "$arg1" ]; then + sudo pacsync aurto >/dev/null echo "aurto: Running: \`aursync --no-view --rmdeps --no-confirm --chroot --repo=aurto ${*:2}\`" >&2 aursync --no-view --rmdeps --no-confirm --chroot --repo=aurto "${@:2}" + sudo pacsync aurto >/dev/null elif [ "$command" == "remove" ] && [ -n "$arg1" ]; then removed="" for pkg in "${@:2}"; do @@ -21,6 +23,7 @@ elif [ "$command" == "remove" ] && [ -n "$arg1" ]; then done if [ -n "$removed" ]; then echo -e "aurto: Removed \\e[36m$removed\\e[39m" >&2 + sudo pacsync aurto >/dev/null fi else echo -e "\\e[1maurto \\e[21mv$version: simple management tool for the 'aurto' repository" diff --git a/lib/update-aurto b/lib/update-aurto index c5ea36c..22ed932 100755 --- a/lib/update-aurto +++ b/lib/update-aurto @@ -11,7 +11,7 @@ if [ -z "$user" ]; then exit 1 fi -pacman -Sy >/dev/null 2>&1 +pacsync aurto sudo -u "$user" aursync --no-view --rmdeps --no-confirm --repo aurto --chroot --update @@ -24,4 +24,5 @@ if [ -e /usr/lib/aurto/check-vcs ]; then fi fi -/usr/bin/paccache -rk1 -c /var/cache/pacman/aurto +pacsync aurto +paccache -rk1 -c /var/cache/pacman/aurto