aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-06 12:24:21 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-06 12:24:21 +0000
commit998b8c5e5dfa113082021b4e157beb404658bafe (patch)
tree4705f38a6ddf300814846accd61df51c4558318b
parent9ad8bbc55527c8d5eb10f7b3f88326a8b6c1a018 (diff)
downloadcpt-998b8c5e5dfa113082021b4e157beb404658bafe.tar.gz
kiss: simplify
FossilOrigin-Name: 1689844cb87ed5a33cde65070beb75567635d4e550334084f657e19319e551bd
-rwxr-xr-xkiss15
1 files changed, 5 insertions, 10 deletions
diff --git a/kiss b/kiss
index 7554f2c..c84aae8 100755
--- a/kiss
+++ b/kiss
@@ -773,20 +773,16 @@ pkg_conflicts() {
sed -i "$(esc "$con" "/$cho_dir/$p_name$con_name")" \
"$tar_dir/$p_name/$pkg_db/$p_name/manifest"
done
- else
- if "$grep" -Fxf "$cac_dir/$pid-m" -- "$@"; then
- log "Package '$p_name' conflicts with another package" "" "!>"
- log "Run 'KISS_CHOICE=1 kiss i $p_name' to add conflicts" "" "!>"
- die "as alternatives."
- fi
+
+ elif "$grep" -Fxf "$cac_dir/$pid-m" -- "$@"; then
+ log "Package '$p_name' conflicts with another package" "" "!>"
+ log "Run 'KISS_CHOICE=1 kiss i $p_name' to add conflicts" "" "!>"
+ die "as alternatives."
fi
}
pkg_swap() {
# Swap between package alternatives.
-
- # Check to see if the package is installed. This
- # will exit with an error if it is not.
pkg_list "$1" >/dev/null
alt=$(printf %s "$1$2" | sed 's|/|>|g')
@@ -829,7 +825,6 @@ pkg_remove() {
# Remove a package and all of its files. The '/etc' directory
# is handled differently and configuration files are *not*
# overwritten.
-
pkg_list "$1" >/dev/null || return
# Enable globbing.