aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-10-31 12:17:53 +0000
committermerakor <cem@ckyln.com>2020-10-31 12:17:53 +0000
commit3591d3541eb9d79dd23de43995be0e8c05d83213 (patch)
treeca88a0e5dad1ce6c50b0f4634e685010cef0eb82 /src
parentb68bc7228a97daf54ac8a6bfa1f7961d7e7dc212 (diff)
downloadcpt-3591d3541eb9d79dd23de43995be0e8c05d83213.tar.gz
src: update parser definitions
FossilOrigin-Name: 8f46944f81271ff851a5d21bfbaa21ad86f8cf120ef22bf8f9a64ecd3f339eb3
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cpt-build8
-rwxr-xr-xsrc/cpt-install7
-rw-r--r--src/cpt-lib10
-rwxr-xr-xsrc/cpt-list3
-rwxr-xr-xsrc/cpt-remove7
-rwxr-xr-xsrc/cpt-search7
-rwxr-xr-xsrc/cpt-update11
7 files changed, 23 insertions, 30 deletions
diff --git a/src/cpt-build b/src/cpt-build
index 90c865e..389c824 100755
--- a/src/cpt-build
+++ b/src/cpt-build
@@ -4,15 +4,13 @@
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
parser_definition() {
- setup REST -- "usage: ${0##*/} [pkg...]"
+ setup REST help:usage -- "usage: ${0##*/} [pkg...]"
msg -- '' 'Options:'
- flag CPT_TEST -t --test export:1 init:="$CPT_TEST" -- \
- "Run tests (if they exist)"
+ flag CPT_TEST -t --test export:1 init:@export -- "Run tests (if they exist)"
global_options
}
-eval "$(getoptions parser_definition parse "$0")"
-eval "$(getoptions_help parser_definition usage "$0")"
+eval "$(getoptions parser_definition parse "$0")"
parse "$@"
eval set -- "$REST"
diff --git a/src/cpt-install b/src/cpt-install
index 082d9d1..4dadcda 100755
--- a/src/cpt-install
+++ b/src/cpt-install
@@ -4,14 +4,13 @@
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
parser_definition() {
- setup REST -- "usage: ${0##*/} [pkg...]"
+ setup REST help:usage -- "usage: ${0##*/} [pkg...]"
msg -- '' 'Options:'
- flag CPT_FORCE -f --force init:="$CPT_FORCE" -- "Force installation"
+ flag CPT_FORCE -f --force init:@export -- "Force installation"
global_options
}
-eval "$(getoptions parser_definition parse "$0")"
-eval "$(getoptions_help parser_definition usage "$0")"
+eval "$(getoptions parser_definition parse "$0")"
parse "$@"
eval set -- "$REST"
diff --git a/src/cpt-lib b/src/cpt-lib
index ccba660..f69aca1 100644
--- a/src/cpt-lib
+++ b/src/cpt-lib
@@ -277,11 +277,11 @@ getoptions_help() {
global_options() {
msg -- '' 'Global Options:'
- flag CPT_FORCE -f --force init:="$CPT_FORCE" -- "Force operation"
- flag CPT_PROMPT -y --no-prompt on:0 off: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"
+ flag CPT_FORCE -f --force init:@export -- "Force operation"
+ flag CPT_PROMPT -y --no-prompt on:0 off:0 init:@export -- "Do not prompt for confirmation"
+ param CPT_ROOT --root init:@export -- "Use an alternate root directory"
+ disp :usage -h --help -- "Show this help message"
+ disp :version -v --version -- "Print version information"
}
warn() {
diff --git a/src/cpt-list b/src/cpt-list
index cbf8880..aaef8d9 100755
--- a/src/cpt-list
+++ b/src/cpt-list
@@ -4,14 +4,13 @@
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
parser_definition() {
- setup REST -- "usage: ${0##*/} [-c] [pkg...]"
+ setup REST help:usage -- "usage: ${0##*/} [-c] [pkg...]"
msg -- '' 'Options:'
flag CURRENT -c --current -- "Use the current directory as a package"
global_options
}
eval "$(getoptions parser_definition parse "$0")"
-eval "$(getoptions_help parser_definition usage)"
parse "$@"
eval set -- "$REST"
diff --git a/src/cpt-remove b/src/cpt-remove
index fc4cf43..b6fed58 100755
--- a/src/cpt-remove
+++ b/src/cpt-remove
@@ -4,14 +4,13 @@
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
parser_definition() {
- setup REST -- "usage: ${0##*/} [pkg...]"
+ setup REST help:usage -- "usage: ${0##*/} [pkg...]"
msg -- '' 'Options:'
- flag CPT_FORCE -f --force init:="$CPT_FORCE" -- "Force removal"
+ flag CPT_FORCE -f --force init:@export -- "Force removal"
global_options
}
-eval "$(getoptions parser_definition parse "$0")"
-eval "$(getoptions_help parser_definition usage "$0")"
+eval "$(getoptions parser_definition parse "$0")"
parse "$@"
eval set -- "$REST"
diff --git a/src/cpt-search b/src/cpt-search
index 41d96fb..9252da7 100755
--- a/src/cpt-search
+++ b/src/cpt-search
@@ -4,14 +4,13 @@
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
parser_definition() {
- setup REST -- "usage: ${0##*/} [pkg...]"
+ setup REST help:usage -- "usage: ${0##*/} [pkg...]"
msg -- '' 'Options:'
- flag all -s --single init:=1 on:'' -- "Only show the first instance of a package"
+ flag all -s --single init:=1 on:'' -- "Only show the first instance of a package"
global_options
}
-eval "$(getoptions parser_definition parse "$0")"
-eval "$(getoptions_help parser_definition usage "$0")"
+eval "$(getoptions parser_definition parse "$0")"
parse "$@"
eval set -- "$REST"
diff --git a/src/cpt-update b/src/cpt-update
index 8143535..b3884e3 100755
--- a/src/cpt-update
+++ b/src/cpt-update
@@ -4,16 +4,15 @@
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
parser_definition() {
- setup REST -- "usage: ${0##*/} [options]"
+ setup REST help:usage -- "usage: ${0##*/} [options]"
msg -- '' 'Options:'
- flag download_only -d --download -- "Only download updatable packages"
- flag CPT_FETCH -n --no-fetch on:0 off:0 init:="$CPT_FETCH" -- "Do not refresh the repositories"
- disp :pkg_fetch -o --only-fetch -- "Only fetch repositories"
+ flag download_only -d --download -- "Only download updatable packages"
+ flag CPT_FETCH -n --no-fetch on:0 off:0 init:@export -- "Do not refresh the repositories"
+ disp :pkg_fetch -o --only-fetch -- "Only fetch repositories"
global_options
}
-eval "$(getoptions parser_definition parse "$0")"
-eval "$(getoptions_help parser_definition usage "$0")"
+eval "$(getoptions parser_definition parse "$0")"
parse "$@"
eval set -- "$REST"