xbps-src: Preprocess arguments using getopt in order to allow options before and after XBPS_TARGET.
This commit is contained in:
parent
101fe26e1b
commit
05ff430223
6
xbps-src
6
xbps-src
|
@ -408,8 +408,12 @@ export XBPS_MACHINE=$(xbps-uhelper arch)
|
||||||
# main()
|
# main()
|
||||||
#
|
#
|
||||||
XBPS_OPTIONS=
|
XBPS_OPTIONS=
|
||||||
|
XBPS_OPTSTRING="a:CEfgGhH:Ij:Lm:No:r:tV"
|
||||||
|
|
||||||
while getopts "a:CEfgGhH:Ij:Lm:No:r:tV" opt; do
|
# Preprocess arguments in order to allow options before and after XBPS_TARGET.
|
||||||
|
eval set -- $(getopt -- "$XBPS_OPTSTRING" "$@");
|
||||||
|
|
||||||
|
while getopts "$XBPS_OPTSTRING" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
a) readonly XBPS_CROSS_BUILD="$OPTARG"; XBPS_OPTIONS+=" -a $OPTARG";;
|
a) readonly XBPS_CROSS_BUILD="$OPTARG"; XBPS_OPTIONS+=" -a $OPTARG";;
|
||||||
C) readonly XBPS_KEEP_ALL=1; XBPS_OPTIONS+=" -C";;
|
C) readonly XBPS_KEEP_ALL=1; XBPS_OPTIONS+=" -C";;
|
||||||
|
|
Loading…
Reference in New Issue