kiss: misc clean up

This commit is contained in:
Dylan Araps 2020-02-20 00:57:12 +02:00
parent 0f7dd1c60d
commit ad89d327f9
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 2 additions and 6 deletions

8
kiss
View File

@ -1153,7 +1153,6 @@ pkg_updates() {
set -f set -f
# If the package manager has an update, handle it first.
contains "$outdated" kiss && { contains "$outdated" kiss && {
log "Detected package manager update" log "Detected package manager update"
log "The package manager will be updated first" log "The package manager will be updated first"
@ -1169,7 +1168,6 @@ pkg_updates() {
exit 0 exit 0
} }
# End here if no packages have an update.
[ "$outdated" ] || { [ "$outdated" ] || {
log "Everything is up to date" log "Everything is up to date"
return return
@ -1183,7 +1181,6 @@ pkg_updates() {
"${PAGER:-less}" "$mak_dir/log" "${PAGER:-less}" "$mak_dir/log"
# Tell 'pkg_build' to always prompt before build. # Tell 'pkg_build' to always prompt before build.
pkg_update=1
# Build all packages requiring an update. # Build all packages requiring an update.
# See [1] at top of script. # See [1] at top of script.
@ -1225,7 +1222,7 @@ args() {
# This handles the globbing characters '*', '!', '[' and ']' as per: # This handles the globbing characters '*', '!', '[' and ']' as per:
# https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html # https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
[ "${action##[as]*}" ] && [ "${action##[as]*}" ] &&
case $@ in *'*'*|*'!'*|*'['*|*']'*) case $@ in *\**|*\!*|*\[*|*\]*)
die "Arguments contain invalid characters: '!*[]'" die "Arguments contain invalid characters: '!*[]'"
esac esac
@ -1402,8 +1399,7 @@ main() {
"${tar_dir:=$cac_dir/extract-$pid}" \ "${tar_dir:=$cac_dir/extract-$pid}" \
"${src_dir:=$cac_dir/sources}" \ "${src_dir:=$cac_dir/sources}" \
"${log_dir:=$cac_dir/logs}" \ "${log_dir:=$cac_dir/logs}" \
"${bin_dir:=$cac_dir/bin}" \ "${bin_dir:=$cac_dir/bin}"
|| die "Couldn't create cache directories"
args "$@" args "$@"
} }