aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-update
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-08-23 13:25:06 +0000
committermerakor <cem@ckyln.com>2020-08-23 13:25:06 +0000
commit1df4ecaf961d124ab31ca74407eabd874a521403 (patch)
treeb28e99785c23165811e6811831bacf6f0df699d0 /src/cpt-update
parent9031dc631fa33a1493f5780943f8f888ce530178 (diff)
downloadcpt-1df4ecaf961d124ab31ca74407eabd874a521403.tar.gz
getoptions: do not unset variables if parameters aren't given.
FossilOrigin-Name: d3aeabb1ff9e6acaea85638e37721065bb937b2cb1a349270a5dbcb0ef669d59
Diffstat (limited to 'src/cpt-update')
-rwxr-xr-xsrc/cpt-update12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cpt-update b/src/cpt-update
index 415353b..bbda066 100755
--- a/src/cpt-update
+++ b/src/cpt-update
@@ -7,12 +7,12 @@ if command -v cpt-lib >/dev/null; then . cpt-lib; else . ./cpt-lib; fi
parser_definition() {
setup REST -- "usage: ${0##*/} [options]"
msg -- '' 'Options:'
- flag download_only -d --download -- "Only download updatable packages"
- flag CPT_FETCH -n --no-fetch on:0 -- "Do not refresh the repositories"
- flag CPT_PROMPT -y --no-prompt on:0 -- "Do not prompt for confirmation"
- param CPT_ROOT --root -- "Use an alternate root directory"
- disp :usage -h --help
- disp :version -v --version
+ flag download_only -d --download -- "Only download updatable packages"
+ flag CPT_FETCH -n --no-fetch on:0 init:"$CPT_FETCH" -- "Do not refresh the repositories"
+ flag CPT_PROMPT -y --no-prompt on:0 init:"$CPT_PROMPT" -- "Do not prompt for confirmation"
+ param CPT_ROOT --root init:"$CPT_ROOT" -- "Use an alternate root directory"
+ disp :usage -h --help -- "Show this help message"
+ disp :version -v --version -- "Print version information"
}
eval "$(getoptions parser_definition parse "$0")"