diff options
-rwxr-xr-x | src/cpt-update | 10 |
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 |