3 readonly aur_version
='AURUTILS_VERSION'
4 readonly lib_dir
=${AUR_EXEC_PATH:-'AURUTILS_LIB_DIR'}
8 printf >&2 'usage: %s [command]\n\n' "$argv0"
9 printf >&2 'available commands:\n'
11 for p
in "$lib_dir"/aur-
*; do
12 printf '%q\n' "${p##*/aur-}"
15 printf >&2 '\navailable user commands:\n'
17 compgen
-c aur- |
sort -u |
while IFS
= read -r; do
18 if ! [[ -f $lib_dir/$REPLY ]]; then
19 printf '%q\n' "${REPLY#aur-}"
26 if [[ $1 == '--version' ]]; then
27 printf >&2 'aur version %s\n' "$aur_version"
31 if [[ "$PATH" != "$lib_dir:"* ]]; then
32 readonly PATH
=$lib_dir:$PATH
35 if type -P "aur-$1" >/dev
/null
; then
36 exec "aur-$1" "${@:2}"
38 printf >&2 '%s: %q is not an aur command\n' "$argv0" "$1"