Skip to content

Commit 1ae0f69

Browse files
committed
[update] : Added aur packages support
1 parent 1fb0009 commit 1ae0f69

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tools/allpkglist.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

2627
script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && cd .. && pwd )"
2728
tools_dir="${script_path}/tools"
2829
out_dir=""
2930
archs=("x86_64" "i686" "i486")
3031
stdout=false
32+
include_aur=false
3133

3234
# Parse options
3335
ARGUMENT="${@}"
3436
opt_short="a:o:hs"
35-
opt_long="arch:,out:,help,stdout"
37+
opt_long="arch:,out:,help,stdout,aur"
3638
OPT=$(getopt -o ${opt_short} -l ${opt_long} -- ${ARGUMENT})
3739
[[ ${?} != 0 ]] && exit 1
3840
eval 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

Comments
 (0)