@@ -21,18 +21,20 @@ _help() {
2121 echo " -o | --out Specify the output dir"
2222 echo " -s | --stdout Output to stdout (Ignore -o)"
2323 echo " -h | --help This help message"
24+ echo " --aur Include aur package to the list"
2425}
2526
2627script_path=" $( cd -P " $( dirname " $( readlink -f " $0 " ) " ) " && cd .. && pwd ) "
2728tools_dir=" ${script_path} /tools"
2829out_dir=" "
2930archs=(" x86_64" " i686" " i486" )
3031stdout=false
32+ include_aur=false
3133
3234# Parse options
3335ARGUMENT=" ${@ } "
3436opt_short=" a:o:hs"
35- opt_long=" arch:,out:,help,stdout"
37+ opt_long=" arch:,out:,help,stdout,aur "
3638OPT=$( getopt -o ${opt_short} -l ${opt_long} -- ${ARGUMENT} )
3739[[ ${?} != 0 ]] && exit 1
3840eval set -- " ${OPT} "
@@ -56,6 +58,10 @@ while true; do
5658 _help
5759 exit 0
5860 ;;
61+ --aur)
62+ include_aur=true
63+ shift 1
64+ ;;
5965 --)
6066 shift 1
6167 break
@@ -94,8 +100,16 @@ for arch in ${archs[@]}; do
94100
95101 if [[ " ${stdout} " = true ]]; then
96102 pkglist+=($( " ${tools_dir} /pkglist.sh" ${pkglist_opts} ) )
103+ if [[ " ${include_aur} " = true ]]; then
104+ pkglist+=($( " ${tools_dir} /pkglist.sh" --aur ${pkglist_opts} ) )
105+ fi
97106 else
98- " ${tools_dir} /pkglist.sh" -d ${pkglist_opts} 1> " ${out_dir} /$( basename " ${channel} " ) .${arch} "
107+ (
108+ " ${tools_dir} /pkglist.sh" -d ${pkglist_opts}
109+ if [[ " ${include_aur} " = true ]]; then
110+ " ${tools_dir} /pkglist.sh" --aur -d ${pkglist_opts}
111+ fi
112+ ) 1> " ${out_dir} /$( basename " ${channel} " ) .${arch} "
99113 fi
100114
101115 done
0 commit comments