aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-07-17 10:24:34 +0000
committermerakor <cem@ckyln.com>2020-07-17 10:24:34 +0000
commit09e0710f8e06443615ecc216ec34ff8173ca51d4 (patch)
tree17f3320327c16700f6a1f60415ac231495d4d10c /kiss
parent52439d3cf7a543eca78ac9b4c93bf7cdd3e40f42 (diff)
downloadcpt-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-xkiss20
1 files changed, 9 insertions, 11 deletions
diff --git a/kiss b/kiss
index 60ab7e0..82c1be1 100755
--- a/kiss
+++ b/kiss
@@ -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 ;;