2 [[ -v AUR_DEBUG
]] && set -o xtrace
4 PS4
='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
10 printf >&2 'usage: %s [--srcinfo] [--lint] [--config <file>]' "$argv0"
14 # mollyguard for sourcing PKGBUILDs
15 if (( UID
== 0 )) && [[ ! -v AUR_ASROOT
]]; then
16 printf >&2 'warning: aur-%s is not meant to be run as root.\n' "$argv0"
17 printf >&2 'warning: To proceed anyway, set the %s variable.\n' 'AUR_ASROOT'
21 source /usr
/share
/makepkg
/util
/option.sh
22 source /usr
/share
/makepkg
/util
/parseopts.sh
23 source /usr
/share
/makepkg
/util
/config.sh
27 opt_long
=('buildscript:' 'config:' 'lint' 'srcinfo')
28 opt_hidden
=('dump-options')
30 if ! parseopts
"$opt_short" "${opt_long[@]}" "${opt_hidden[@]}" -- "$@"; then
35 unset buildscript build_user makepkg_conf
39 shift; buildscript
=$1 ;;
41 shift; makepkg_conf
=$1 ;;
47 printf -- '--%s\n' "${opt_long[@]}" ${AUR_DEBUG+"${opt_hidden[@]}"}
48 printf -- '%s' "${opt_short}" | sed 's/.:\?/-&\n/g'
55 # Sourcing the PKGBUILD should be done without set -e or other modes
56 # to match makepkg behavior (e.g. aur/cemu, aur/nicotine-plus-git)
57 # shellcheck disable=SC1090
58 source "${buildscript-PKGBUILD}"
59 PKGDEST=${PKGDEST:-$PWD}
61 # PKGEXT (packagelist), CARCH (lint)
62 load_makepkg_config "${makepkg_conf-}"
65 source /usr/share/makepkg/lint_pkgbuild.sh
71 source /usr/share/makepkg/util/pkgbuild.sh
72 print_all_package_names
75 source /usr/share/makepkg/srcinfo.sh