Skip to content

Commit

Permalink
Use pacsync to keep aurto synced
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed Jan 30, 2018
1 parent ee98339 commit 83675e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
3 changes: 3 additions & 0 deletions bin/aurto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions lib/update-aurto
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit 83675e8

Please sign in to comment.