pkglist_args+=("${modules[@]}")
# Set argument of aur.sh and pkgbuild.sh
+ makepkg_script_args+=("-a" "${aur_helper}" "-p" "$(printf "%s\n" "${aur_helper_depends[@]}" | tr "\n" ",")" )
[[ "${bash_debug}" = true ]] && makepkg_script_args+=("-x")
[[ "${pacman_debug}" = true ]] && makepkg_script_args+=("-d")
# prepare for aur helper
_cp "${script_path}/system/aur.sh" "${airootfs_dir}/root/aur.sh"
- _pacstrap --asdeps --needed "go"
+ _pacstrap --asdeps --needed "${aur_helper_depend[@]}"
# Run aur script
- _run_with_pacmanconf _chroot_run "bash" "/root/aur.sh" "${makepkg_script_args[@]}" "${_pkglist_aur[@]}"
+ _run_with_pacmanconf _chroot_run "bash" "/root/aur.sh" -a "${aur_helper}" "${makepkg_script_args[@]}" "${_pkglist_aur[@]}"
# Remove script
remove "${airootfs_dir}/root/aur.sh"
# Use this array only in the configuration files in the channel.
#modules=("share")
+# AUR Helper config
+aur_helper="yay"
+aur_helper_depends=("go")
+
#-- kernel config --#
# Set the kernel that live session use.
# Please don't set anything if you want to use normal kernel.
trap 'exit 1' 1 2 3 15
_help() {
- echo "usage ${0} [option]"
+ echo "usage ${0} [option] [package1] [package2] ..."
echo
echo "Install aur packages with ${aur_helper}"
echo
echo " General options:"
+ echo " -a [command] Set the command of aur helper"
+ echo " -p [pkg1,pkg2...] Set the oackage of the depends of aur helper"
echo " -d Enable pacman debug message"
echo " -u [user] Set the user name to build packages"
echo " -x Enable bash debug message"
echo " -h This help message"
}
-while getopts "du:xh" arg; do
+while getopts "a:p:du:xh" arg; do
case "${arg}" in
+ a) aur_helper="${OPTARG}" ;;
d) pacman_debug=true ;;
u) aur_username="${OPTARG}" ;;
x) set -xv ;;
+ p) readarray -t aur_helper_depends < <(tr "," "\n" <<< "${OPTARG}") ;;
h)
_help
exit 0