From 4e3fc3a684926dd0b6b224eb49a33986b9719961 Mon Sep 17 00:00:00 2001 From: merakor Date: Sat, 26 Jun 2021 14:13:43 +0000 Subject: cpt-update: fix `-o` flag handling FossilOrigin-Name: b9abb2deb7de903cd6295dee955604834032fc0eb1959ce6255bcfa0a2eb51a4 --- src/cpt-update | 10 +++++++--- 1 file 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 -- cgit v1.2.3