aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-06-26 14:13:43 +0000
committermerakor <cem@ckyln.com>2021-06-26 14:13:43 +0000
commit4e3fc3a684926dd0b6b224eb49a33986b9719961 (patch)
tree919c0399e3b5c064818f7349d76cfa36a1b6bd8f
parent0eb001f470c8f162740eb86d17e46b490811e9f2 (diff)
downloadcpt-4e3fc3a684926dd0b6b224eb49a33986b9719961.tar.gz
cpt-update: fix `-o` flag handling
FossilOrigin-Name: b9abb2deb7de903cd6295dee955604834032fc0eb1959ce6255bcfa0a2eb51a4
-rwxr-xr-xsrc/cpt-update10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cpt-update b/src/cpt-update
index a8f9616..7e7ee16 100755
--- a/src/cpt-update
+++ b/src/cpt-update
@@ -6,11 +6,15 @@ parser_definition() {
msg -- '' 'Options:'
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"
+ flag pkg_fetch -o --only-fetch -- "Only fetch repositories"
global_options
}
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
-create_cache
-pkg_updates
+if [ "$pkg_fetch" ]; then
+ pkg_fetch
+else
+ create_cache
+ pkg_updates
+fi