mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 00:20:05 -07:00
kiss: simplify pkg_install_files
Permissions are already preserved.
This commit is contained in:
parent
a5be67afa7
commit
7481a9dca0
12
kiss
12
kiss
@ -1060,11 +1060,13 @@ pkg_install_files() {
|
||||
|
||||
case $rwx in
|
||||
[rwx]*): "$((o+=${c#?}))" ;;
|
||||
[st]*): "$((o+=1))" "$((b+=4 / (${c%?}/3)))" ;;
|
||||
[ST]*): "$((b+=1))" ;;
|
||||
[st]*): "$((o+=1))" ;;
|
||||
[ST]*) ;;
|
||||
esac
|
||||
|
||||
[ "$((${c%?} % 3))" = 0 ] && oct=$oct$o o=0
|
||||
case "$((${c%?} % 3))" in 0)
|
||||
oct=$oct$o o=0
|
||||
esac
|
||||
done
|
||||
|
||||
_file=$KISS_ROOT/${file#/}
|
||||
@ -1098,10 +1100,6 @@ pkg_install_files() {
|
||||
# destination. The running processes will either get
|
||||
# the old file or the new one.
|
||||
mv -f "$__tmp" "$_file"
|
||||
|
||||
# Skip changing permissions of symlinks. This prevents
|
||||
# errors when the symlink exists prior to the target.
|
||||
[ -h "$_file" ] || chmod "$b$oct" "$_file"
|
||||
}
|
||||
esac
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user