forked from kiss-community/kiss
kiss: Add support for KISS_ROOT to install
This commit is contained in:
parent
da605670e0
commit
6bc7deb64b
14
kiss
14
kiss
@ -818,7 +818,7 @@ pkg_install_files() {
|
|||||||
while read -r line; do
|
while read -r line; do
|
||||||
# Grab the octal permissions so that directory creation
|
# Grab the octal permissions so that directory creation
|
||||||
# preserves permissions.
|
# preserves permissions.
|
||||||
perms=$(stat -c %a "$2/$line")
|
rwx=$(stat -c %a "$2/$line")
|
||||||
|
|
||||||
# Copy files and create directories (preserving permissions),
|
# Copy files and create directories (preserving permissions),
|
||||||
# skipping anything located in /etc/.
|
# skipping anything located in /etc/.
|
||||||
@ -827,17 +827,19 @@ pkg_install_files() {
|
|||||||
# for overwrite.
|
# for overwrite.
|
||||||
case $line in /etc/*) ;;
|
case $line in /etc/*) ;;
|
||||||
*/) [ -d "$line" ] ||
|
*/) [ -d "$line" ] ||
|
||||||
install -o root -g root -m "$perms" -d "$line" ;;
|
install -o root -g root -m "$rwx" \
|
||||||
|
-d "$KISS_ROOT/$line" ;;
|
||||||
|
|
||||||
*) test "$1" "$line" ||
|
*) test "$1" "$KISS_ROOT/$line" ||
|
||||||
|
|
||||||
if [ -L "$2/$line" ]; then
|
if [ -L "$2/$line" ]; then
|
||||||
[ -d "$line" ] && continue
|
[ -d "$KISS_ROOT/$line" ] && continue
|
||||||
|
|
||||||
cp -fPp "$2/$line" "${line%/*}"
|
cp -fPp "$2/$line" "${line%/*}"
|
||||||
chown -h root:root "$line"
|
chown -h root:root "$KISS_ROOT/$line"
|
||||||
else
|
else
|
||||||
install -o root -g root -m "$perms" "$2/$line" "$line"
|
install -o root -g root -m "$rwx" \
|
||||||
|
"$2/$line" "$KISS_ROOT/$line"
|
||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user