Browse Source

fix: shellcheck for modules.d/90dmsquash-live/apply-live-updates.sh

master
Harald Hoyer 4 years ago committed by Harald Hoyer
parent
commit
7b1d342e60
  1. 14
      modules.d/90dmsquash-live/apply-live-updates.sh

14
modules.d/90dmsquash-live/apply-live-updates.sh

@ -2,21 +2,17 @@ @@ -2,21 +2,17 @@

if [ -h /dev/root ] && [ -d /run/initramfs/live/updates -o -d /updates ]; then
info "Applying updates to live image..."
mount -o bind /run $NEWROOT/run
mount -o bind /run "$NEWROOT"/run
# avoid overwriting symlinks (e.g. /lib -> /usr/lib) with directories
for d in /updates /run/initramfs/live/updates; do
[ -d "$d" ] || continue
(
cd $d
find . -depth -type d | while read dir; do
mkdir -p "$NEWROOT/$dir"
done
find . -depth \! -type d | while read file; do
cp -a "$file" "$NEWROOT/$file"
done
cd "$d" || return 0
find . -depth -type d -exec mkdir -p "$NEWROOT/{}" \;
find . -depth \! -type d -exec cp -a "{}" "$NEWROOT/{}" \;
)
done
umount $NEWROOT/run
umount "$NEWROOT"/run
fi
# release resources on iso-scan boots with rd.live.ram
if [ -d /run/initramfs/isoscan ] &&

Loading…
Cancel
Save