Pre-refactor

This commit is contained in:
Sam Hardeman 2026-03-13 00:37:28 +01:00
parent 84f55f82b8
commit 2e31283b61
5 changed files with 157 additions and 59 deletions

View file

@ -1,8 +1,7 @@
#!/bin/bash
DIR="$@"
DIR=$(readlink -f "$DIR")
DIR_SHORT=$(basename $DIR)
mkdir -p "$DIR"
DIR_SHORT=$(basename "$DIR")
OVERLAY_ROOT=$(readlink -f "${DIR}/..")/.squashfs/${DIR_SHORT}
OVERLAY_UPPER=${OVERLAY_ROOT}/upper
@ -10,9 +9,8 @@ OVERLAY_LOWER=${OVERLAY_ROOT}/lower
OVERLAY_WORK=${OVERLAY_ROOT}/work
OVERLAY_TARG=$DIR
sudo umount -R "$OVERLAY_ROTO"
sudo umount -R "$OVERLAY_LOWER"
sudo umount -R "$OVERLAY_TARG"
sudo umount -R "$DIR"
sudo umount -R "$OVERLAY_TARG" 2>/dev/null
sudo umount -R "$OVERLAY_LOWER" 2>/dev/null
echo "SquashFS filesystem has been unmounted."
exit 0