mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
ci: Use built-in option parsing in meson-install
This is less concise than the current ad-hoc parsing, but gets
us error handling ("unknown option --foo") and is easier to
extend.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
(cherry picked from commit cdd8d33587)
This commit is contained in:
parent
6f9e463370
commit
9e18945773
1 changed files with 20 additions and 3 deletions
|
|
@ -14,11 +14,28 @@ usage() {
|
|||
EOF
|
||||
}
|
||||
|
||||
TEMP=$(getopt \
|
||||
--name=$(basename $0) \
|
||||
--options=D \
|
||||
-- "$@")
|
||||
|
||||
eval set -- "$TEMP"
|
||||
unset TEMP
|
||||
|
||||
MESON_OPTIONS=()
|
||||
|
||||
while [[ $1 =~ ^-D ]]; do
|
||||
MESON_OPTIONS+=( "$1" )
|
||||
shift
|
||||
while true; do
|
||||
case "$1" in
|
||||
-D)
|
||||
MESON_OPTIONS+=( -D$2 )
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ $# -lt 4 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue