fix: complete switch to newlines

This commit is contained in:
Rudra B.S. 2023-11-22 20:27:59 +05:30
parent bb7e9f2aaf
commit bcec9dcef9

View file

@ -28,15 +28,15 @@ run_latehook() {
if [[ -f /new_root/.etc-stage ]]; then
# Create new /etc.
rm -rf /new_root/.new_etc; cp -a /new_root/etc /new_root/.new_etc
(cd /new_root/.new_etc && find . -type f | grep -Fxvz -f <(cd "/new_root/.update_rootfs/etc" && find . -type f) | xargs rm -f)
(cd /new_root/.new_etc && find . -type l | grep -Fxvz -f <(cd "/new_root/.update_rootfs/etc" && find . -type l) | xargs rm -f)
(cd /new_root/.new_etc && find . -type f | grep -Fxv -f <(cd "/new_root/.update_rootfs/etc" && find . -type f) | xargs rm -f)
(cd /new_root/.new_etc && find . -type l | grep -Fxv -f <(cd "/new_root/.update_rootfs/etc" && find . -type l) | xargs rm -f)
mkdir -p /.old.varlib
(cd /new_root/var/lib && find . -maxdepth 1 -type d | grep -Fxvz -f <(cd "/new_root/.update_rootfs/var/lib" && find . -maxdepth 1 -type d) | grep -Fxvz './pacman' | xargs sh -c 'mv "$@" /new_root/.old.varlib' sh)
(cd /new_root/.update_rootfs/var/lib && find . -maxdepth 1 -type d | grep -Fxvz -f <(cd "/new_root/var/lib" && find . -maxdepth 1 -type d) | xargs sh -c 'cp -r "$@" /new_root/var/lib' sh)
(cd /new_root/var/lib && find . -maxdepth 1 -type d | grep -Fxv -f <(cd "/new_root/.update_rootfs/var/lib" && find . -maxdepth 1 -type d) | grep -Fxv './pacman' | xargs sh -c 'mv "$@" /new_root/.old.varlib' sh)
(cd /new_root/.update_rootfs/var/lib && find . -maxdepth 1 -type d | grep -Fxv -f <(cd "/new_root/var/lib" && find . -maxdepth 1 -type d) | xargs sh -c 'cp -r "$@" /new_root/var/lib' sh)
cp /new_root/.update_rootfs/etc/pacman.conf /new_root/.new_etc/pacman.conf
rm -rf /new_root/.new_etc/pacman.d
cp -a /new_root/.update_rootfs/etc/pacman.d /new_root/.new_etc/pacman.d
(cd /new_root/.update_rootfs/etc && find . -type f | grep -Fxvz -f <(cd "/new_root/.new_etc" && find . -type f) | xargs -n 1 sh -c 'mkdir -p "/new_root/.new_etc/$(dirname "$1")"; cp -a "$1" /new_root/.new_etc/$(dirname "$1")' sh)
(cd /new_root/.update_rootfs/etc && find . -type f | grep -Fxv -f <(cd "/new_root/.new_etc" && find . -type f) | xargs -n 1 sh -c 'mkdir -p "/new_root/.new_etc/$(dirname "$1")"; cp -a "$1" /new_root/.new_etc/$(dirname "$1")' sh)
mv /new_root/etc /new_root/.old.etc || :
mv /new_root/.new_etc /new_root/etc