File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -440,6 +440,7 @@ prepare_build() {
440440 pkglist_args+=(" ${modules[@]} " )
441441
442442 # Set argument of aur.sh and pkgbuild.sh
443+ makepkg_script_args+=(" -a" " ${aur_helper} " " -p" " $( printf " %s\n" " ${aur_helper_depends[@]} " | tr " \n" " ," ) " )
443444 [[ " ${bash_debug} " = true ]] && makepkg_script_args+=(" -x" )
444445 [[ " ${pacman_debug} " = true ]] && makepkg_script_args+=(" -d" )
445446
@@ -531,10 +532,10 @@ make_packages_aur() {
531532
532533 # prepare for aur helper
533534 _cp " ${script_path} /system/aur.sh" " ${airootfs_dir} /root/aur.sh"
534- _pacstrap --asdeps --needed " go "
535+ _pacstrap --asdeps --needed " ${aur_helper_depend[@]} "
535536
536537 # Run aur script
537- _run_with_pacmanconf _chroot_run " bash" " /root/aur.sh" " ${makepkg_script_args[@]} " " ${_pkglist_aur[@]} "
538+ _run_with_pacmanconf _chroot_run " bash" " /root/aur.sh" -a " ${aur_helper} " " ${makepkg_script_args[@]} " " ${_pkglist_aur[@]} "
538539
539540 # Remove script
540541 remove " ${airootfs_dir} /root/aur.sh"
Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ norescue_entry=false
133133# Use this array only in the configuration files in the channel.
134134# modules=("share")
135135
136+ # AUR Helper config
137+ aur_helper=" yay"
138+ aur_helper_depends=(" go" )
139+
136140# -- kernel config --#
137141# Set the kernel that live session use.
138142# Please don't set anything if you want to use normal kernel.
Original file line number Diff line number Diff line change @@ -19,22 +19,26 @@ aur_helper="yay"
1919trap ' exit 1' 1 2 3 15
2020
2121_help () {
22- echo " usage ${0} [option]"
22+ echo " usage ${0} [option] [package1] [package2] ... "
2323 echo
2424 echo " Install aur packages with ${aur_helper} "
2525 echo
2626 echo " General options:"
27+ echo " -a [command] Set the command of aur helper"
28+ echo " -p [pkg1,pkg2...] Set the oackage of the depends of aur helper"
2729 echo " -d Enable pacman debug message"
2830 echo " -u [user] Set the user name to build packages"
2931 echo " -x Enable bash debug message"
3032 echo " -h This help message"
3133}
3234
33- while getopts " du:xh" arg; do
35+ while getopts " a:p: du:xh" arg; do
3436 case " ${arg} " in
37+ a) aur_helper=" ${OPTARG} " ;;
3538 d) pacman_debug=true ;;
3639 u) aur_username=" ${OPTARG} " ;;
3740 x) set -xv ;;
41+ p) readarray -t aur_helper_depends < <( tr " ," " \n" <<< " ${OPTARG}" ) ;;
3842 h)
3943 _help
4044 exit 0
You can’t perform that action at this time.
0 commit comments