kiss: fix args i issues

This commit is contained in:
Dylan Araps 2020-01-27 11:10:53 +02:00
parent 7ab295a76b
commit a01483a261
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

15
kiss
View File

@ -65,6 +65,8 @@ root_cache() {
} }
dosu() { dosu() {
[ "$pass" ] || root_cache
# Run a command as root using the cached password. The 'su' # Run a command as root using the cached password. The 'su'
# command allows you to input a password via stdin. To hide # command allows you to input a password via stdin. To hide
# the prompt, the command's output is sent to '/dev/tty' # the prompt, the command's output is sent to '/dev/tty'
@ -494,7 +496,9 @@ pkg_build() {
# to 'su' to elevate permissions. # to 'su' to elevate permissions.
[ -f "$bin_dir/$pkg#$version-$release.tar.gz" ] && { [ -f "$bin_dir/$pkg#$version-$release.tar.gz" ] && {
log "$pkg" "Found pre-built binary, installing" log "$pkg" "Found pre-built binary, installing"
(KISS_FORCE=1 args i "$bin_dir/$pkg#$version-$release.tar.gz")
dosu KISS_FORCE=1 \
kiss i "$bin_dir/$pkg#$version-$release.tar.gz" ||:
# Remove the now installed package from the build # Remove the now installed package from the build
# list. No better way than using 'sed' in POSIX 'sh'. # list. No better way than using 'sed' in POSIX 'sh'.
@ -581,7 +585,8 @@ pkg_build() {
contains "$explicit" "$pkg" && [ -z "$pkg_update" ] && continue contains "$explicit" "$pkg" && [ -z "$pkg_update" ] && continue
log "$pkg" "Needed as a dependency or has an update, installing" log "$pkg" "Needed as a dependency or has an update, installing"
(KISS_FORCE=1 args i "$pkg")
dosu KISS_FORCE=1 kiss i "$bin_dir/$pkg#$version-$release.tar.gz" ||:
done done
# End here as this was a system update and all packages have been installed. # End here as this was a system update and all packages have been installed.
@ -599,7 +604,7 @@ pkg_build() {
log "Install built packages? [$*]" log "Install built packages? [$*]"
prompt && { prompt && {
args i "$@" dosu kiss i "$@" ||:
return return
} }
} }
@ -941,7 +946,7 @@ pkg_updates() {
prompt prompt
pkg_build kiss pkg_build kiss
args i kiss dosu kiss i kiss ||:
log "Updated the package manager" log "Updated the package manager"
log "Re-run 'kiss update' to update your system" log "Re-run 'kiss update' to update your system"
@ -974,6 +979,8 @@ pkg_updates() {
pkg_clean() { pkg_clean() {
# Clean up on exit or error. This removes everything related # Clean up on exit or error. This removes everything related
# to the build. # to the build.
stty echo 2>/dev/null
[ "$KISS_DEBUG" != 1 ] || return [ "$KISS_DEBUG" != 1 ] || return
# Block 'Ctrl+C' while cache is being cleaned. # Block 'Ctrl+C' while cache is being cleaned.