mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 08:30: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
|
case $rwx in
|
||||||
[rwx]*): "$((o+=${c#?}))" ;;
|
[rwx]*): "$((o+=${c#?}))" ;;
|
||||||
[st]*): "$((o+=1))" "$((b+=4 / (${c%?}/3)))" ;;
|
[st]*): "$((o+=1))" ;;
|
||||||
[ST]*): "$((b+=1))" ;;
|
[ST]*) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ "$((${c%?} % 3))" = 0 ] && oct=$oct$o o=0
|
case "$((${c%?} % 3))" in 0)
|
||||||
|
oct=$oct$o o=0
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
_file=$KISS_ROOT/${file#/}
|
_file=$KISS_ROOT/${file#/}
|
||||||
@ -1098,10 +1100,6 @@ pkg_install_files() {
|
|||||||
# destination. The running processes will either get
|
# destination. The running processes will either get
|
||||||
# the old file or the new one.
|
# the old file or the new one.
|
||||||
mv -f "$__tmp" "$_file"
|
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
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user