From 843c958059e301e77fa23d1a508e115501868d3f Mon Sep 17 00:00:00 2001 From: merakor Date: Sun, 26 Apr 2020 10:18:01 +0000 Subject: kiss: Add support for KISS_ROOT to install FossilOrigin-Name: 2e01c5c6f017ec08af0a223470b6d5dbb94c5a64753e3e6d56ecb1f68beffb4b --- kiss | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'kiss') diff --git a/kiss b/kiss index 7bbd45c..ff60efc 100755 --- a/kiss +++ b/kiss @@ -859,7 +859,7 @@ pkg_install_files() { sort "$2/$pkg_db/${2##*/}/manifest" | while read -r line; do i=$((i+1)) # Grab the permissions so that we can preserve them. - perms=$(stat -c %a "$tar_dir/$pkg_name/$line") + rwx=$(stat -c %a "$tar_dir/$pkg_name/$line") # Copy files and create directories (preserving permissions), # skipping anything located in /etc/. @@ -868,15 +868,17 @@ pkg_install_files() { # for overwrite. case $line in /etc/*) ;; */) [ -d "$line" ] || - install -o root -g root -m "$perms" -d "$line" ;; - *) test "$1" "$line" || + install -o root -g root -m "$rwx" \ + -d "$KISS_ROOT/$line" ;; + *) test "$1" "$KISS_ROOT/$line" || if [ -L "$2/$line" ]; then - [ -d "$line" ] && continue + [ -d "$KISS_ROOT/$line" ] && continue cp -fPp "$2/$line" "${line%/*}" - chown -h root:root "$line" + chown -h root:root "$KISS_ROOT/$line" else - install -o root -g root -m "$perms" "$2/$line" "$line" + install -o root -g root -m "$rwx" \ + "$2/$line" "$KISS_ROOT/$line" fi esac -- cgit v1.2.3