diff options
author | merakor <cem@ckyln.com> | 2020-04-26 10:18:01 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-04-26 10:18:01 +0000 |
commit | 843c958059e301e77fa23d1a508e115501868d3f (patch) | |
tree | 92bf88bebda72a4f33680b7997ec3e74c18f6fc9 | |
parent | 89c262ba4066235deae367ee8fd1e6683c25d524 (diff) | |
download | cpt-843c958059e301e77fa23d1a508e115501868d3f.tar.gz |
kiss: Add support for KISS_ROOT to install
FossilOrigin-Name: 2e01c5c6f017ec08af0a223470b6d5dbb94c5a64753e3e6d56ecb1f68beffb4b
-rwxr-xr-x | kiss | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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 |