diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-07-13 22:15:45 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-07-13 22:15:45 +0000 |
commit | 34383cf0407d1a72cf0afd9f7af16d1db5166e5e (patch) | |
tree | d41d45e8e51bd2afbd2b99646cdc3d9756252183 | |
parent | d80e4d2539f24ca081900cd377d76bfdd96778f3 (diff) | |
download | cpt-34383cf0407d1a72cf0afd9f7af16d1db5166e5e.tar.gz |
kiss: Make build with no args rebuild system.
FossilOrigin-Name: 98207157f5f355ce988835c43d4292e99305ec1310525a5d7af3ad391e537b48
-rwxr-xr-x | kiss | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -346,17 +346,6 @@ pkg_build() { # also checks checksums, downloads sources and ensure all dependencies # are installed. - # If 'all' was passed to 'kiss build', rebuild all packages. - [ "$1" = all ] && { - cd "$KISS_ROOT/var/db/kiss" || die "Failed to find installed packages." - - # Use a glob after 'cd' to generate a list of all installed packages - # based on directory names. - set -- * - - [ "$1" = \* ] && die "No packages installed, aborting..." - } - # Resolve dependencies and generate a list. # Send 'force' to 'pkg_depends' to always include the explicitly # requested packages. @@ -878,7 +867,20 @@ args() { # Build the list of packages. b*) shift - [ "$1" ] || die "'kiss build' requires an argument." + + # If no arguments were passed, rebuild all packages. + [ "$1" ] || { + cd "$KISS_ROOT/var/db/kiss" || die "Failed to find package db." + + # Use a glob after 'cd' to generate a list of all + # installed packages based on directory names. + set -- * + + # Undo the above 'cd' to ensure we stay in the same + # location. + cd - >/dev/null + } + pkg_build "$@" ;; |