diff options
author | merakor <cem@ckyln.com> | 2020-07-17 10:24:34 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-07-17 10:24:34 +0000 |
commit | 09e0710f8e06443615ecc216ec34ff8173ca51d4 (patch) | |
tree | 17f3320327c16700f6a1f60415ac231495d4d10c /kiss | |
parent | 52439d3cf7a543eca78ac9b4c93bf7cdd3e40f42 (diff) | |
download | cpt-09e0710f8e06443615ecc216ec34ff8173ca51d4.tar.gz |
kiss: change behaviour for downloading updates
kiss update: add --download|-d flag for only downloading packages and exiting
kiss download: if no arguments are given use the current directory for downloading
FossilOrigin-Name: 8cb866afa98d7dff4e8c9b645698566d1fb4ce432aff869863282e57fe469e17
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -1343,7 +1343,10 @@ pkg_updates(){ # If the download option is specified only download the outdated packages # and exit. - [ "$download" ] && { + [ "$download_only" = 1 ] && { + log "Only sources for the packages will be acquired" + prompt || exit 0 + for pkg in $outdated; do pkg_sources "$pkg" done @@ -1448,7 +1451,7 @@ args() { esac case $action in - b|build|c|checksum|i|install|r|remove) + b|build|c|checksum|d|download|i|install|r|remove) [ "$1" ] || { # We are exporting the KISS_PATH, so if another # instance of 'kiss' is spawned from the current @@ -1557,18 +1560,13 @@ args() { done ;; - d|download) - # If no arguments are given, download the sources - # for outdated packages. - [ "$1" ] || { download=1; pkg_updates ;} - - # Acquire sources for all given packages. - for pkg do pkg_sources "$pkg"; done - ;; + u|update) + case "$1" in --download|-d) download_only=1; esac + pkg_updates ;; b|build) pkg_build "${@:?No packages installed}" ;; + d|download) for pkg do pkg_sources "$pkg"; done ;; l|list) pkg_list "$@" ;; - u|update) pkg_updates ;; s|search) for pkg do pkg_find "$pkg" all; done ;; v|version) log kiss 2.3.0 ;; |