3 [[ -v AUR_DEBUG
]] && set -o xtrace
5 PS4
='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
11 printf >&2 'usage: %s [--srcinfo] [--lint] [--config <file>]' "$argv0"
15 # mollyguard for sourcing PKGBUILDs
16 if [[ $UID == 0 ]] && ! [[ -v AUR_ASROOT
]]; then
17 printf >&2 'aur-%s is not meant to be run as root.\n' "$argv0"
18 printf >&2 'To proceed anyway, set the %s variable.\n' 'AUR_ASROOT'
22 source /usr
/share
/makepkg
/util
/option.sh
23 source /usr
/share
/makepkg
/util
/parseopts.sh
24 source /usr
/share
/makepkg
/util
/config.sh
28 opt_long
=('buildscript:' 'config:' 'lint' 'srcinfo' 'full')
29 opt_hidden
=('dump-options')
31 if ! parseopts
"$opt_short" "${opt_long[@]}" "${opt_hidden[@]}" -- "$@"; then
36 unset buildscript makepkg_conf
40 shift; buildscript
=$1 ;;
42 shift; makepkg_conf
=$1 ;;
50 printf -- '--%s\n' "${opt_long[@]}" ${AUR_DEBUG+"${opt_hidden[@]}"}
51 printf -- '%s' "${opt_short}" | sed 's/.:\?/-&\n/g'
58 # shellcheck disable=SC1090
59 source "${buildscript-PKGBUILD}"
60 pkgbase=${pkgbase:-$pkgname}
61 PKGDEST=${PKGDEST:-$PWD}
63 # PKGEXT (packagelist), CARCH (lint)
64 load_makepkg_config "${makepkg_conf-}"
67 source /usr/share/makepkg/lint_pkgbuild.sh
73 source /usr/share/makepkg/util/pkgbuild.sh
74 print_all_package_names
77 source /usr/share/makepkg/util/pkgbuild.sh
78 print_all_package_names | while IFS= read -r; do
79 printf '%s:%s\n' "$pkgbase" "$REPLY"
82 source /usr/share/makepkg/srcinfo.sh