chore: keep localtime

This commit is contained in:
Rudra B.S. 2023-11-24 13:46:14 +05:30
parent 82c765a562
commit 1602ae3dd6

View file

@ -29,7 +29,7 @@ run_latehook() {
# 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 -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)
(cd /new_root/.new_etc && find . -type l | grep -Fxv -f <(cd "/new_root/.update_rootfs/etc" && find . -type l) | grep -Fxv './localtime' | xargs rm -f)
mkdir -p /.old.varlib
(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)