Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch-test: accept long options with arg separated by equals #632

Merged
merged 3 commits into from Feb 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions bin/ch-test
Expand Up @@ -510,6 +510,10 @@ while [[ $# -gt 0 ]]; do
require_unset builder
builder=$1; shift
;;
--builder=*)
require_unset builder
builder=${opt#*=}
;;
--dry-run)
dry=true
;;
Expand All @@ -520,22 +524,43 @@ while [[ $# -gt 0 ]]; do
require_unset imgdir
imgdir=$1; shift
;;
--img-dir=*)
require_unset imgdir
imgdir=${opt#*=}
;;
--pack-dir)
require_unset tardir
tardir=$1; shift
;;
--pack-dir=*)
require_unset tardir
tardir=${opt#*=}
;;
--pedantic)
pedantic=$1; shift
;;
--pedantic=*)
pedantic=${opt#*=}
;;
--perm-dir)
use_sudo=yes
permdirs+=("$1"); shift
;;
--perm-dir=*)
use_sudo=yes
permdirs+=("${opt#*=}")
;;
-s|--scope)
require_unset scope
scope_check "$1"
scope=$1; shift
;;
--scope=*)
require_unset scope
arg=${opt#*=}
scope_check "$arg"
scope=$arg
;;
--sudo)
use_sudo=yes
;;
Expand Down