-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
## from: man aurvcs | ||
# shellcheck disable=SC2035 disable=2094 | ||
set -eu | ||
|
||
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} | ||
AURDEST=${AURDEST:-$XDG_CACHE_HOME/aurutils/sync} | ||
AURVCS=${AURVCS:-.*-(cvs|svn|git|hg|bzr|darcs)$} | ||
|
||
filter_vcs() { | ||
awk -v "mask=$AURVCS" '$1 ~ mask {print $1}' "$@" | ||
} | ||
|
||
# Note that valid PKGBUILDs cannot contain \n in pkgname. | ||
get_latest_revision() { | ||
grep -Fxf - <(printf '%s\n' *) | xargs -r aur srcver | ||
} | ||
|
||
db_tmp=$(mktemp) | ||
trap 'rm -rf "$db_tmp"' EXIT | ||
|
||
# Retrieve a list of the local repository contents. The repository | ||
# can be specified with the usual aur-repo arguments. | ||
aur repo --list "$@" >"$db_tmp" | ||
|
||
# Find VCS packages that are outdated according to aur-srcver. | ||
# This checks out the latest revision for existing source directories, | ||
# assuming the PKGBUILD has been viewed priorly. | ||
if cd "$AURDEST"; then | ||
aur vercmp -p <(filter_vcs "$db_tmp" | get_latest_revision) < "$db_tmp" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.