aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-26 18:21:42 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-26 18:21:42 +0000
commitf9909596f03d17002f2444082169767e5c595fa1 (patch)
treea5d70ec9943d76b5e3970e4f9c20231f3e022fa4
parent93eab21949a97f50613efe92416cdba962ab258d (diff)
downloadcpt-f9909596f03d17002f2444082169767e5c595fa1.tar.gz
kiss: clean up
FossilOrigin-Name: 81dc120a72a2df5954c74e04d112b5339e10971773a44dd01b921379c8dde8f9
-rwxr-xr-xkiss10
1 files changed, 4 insertions, 6 deletions
diff --git a/kiss b/kiss
index 7580078..7e38f14 100755
--- a/kiss
+++ b/kiss
@@ -199,12 +199,10 @@ pkg_install() {
find ./ -mindepth 1 -not -type d | while read -r file; do
rpath=${file#.}
- case $rpath in
- /etc/*) [ -f "$sys_dir${rpath%/*}/${file##*/}" ] || mv=1 ;;
- *) mv=1 ;;
- esac
+ [ -z "${rpath##/etc/*}" ] && [ -f "$sys_dir${rpath%/*}/${file##*/}" ] &&
+ return
- [ "$mv" ] && mv "$file" "$sys_dir${rpath%/*}" ;mv=
+ mv "$file" "$sys_dir${rpath%/*}"
done
"$sys_db/$name/post-install" 2>/dev/null
@@ -233,7 +231,7 @@ pkg_remove() {
# Use the backup of 'rm' to remove 'rmdir' and itself.
"$cac_dir/rm" "$cac_dir/rmdir" "$cac_dir/rm"
- log "Removed ${1:-name}."
+ log "Removed ${1:-$name}."
}
pkg_updates() {