omarchy-iso-cleanup-disk: add --protected mode; adapter: doc pre-mount mount semantics

This commit is contained in:
Ryan Hughes committed 2026-05-21 18:06:52 -04:00
1 parent 064b5e2393
commit b36280f1a6
2 files changed
+11 -1

No files matched your search

@@ -10,6 +10,13 @@
set -uo pipefail
if [[ ${1:-} == --protected ]]; then
target="${2:-}"
[[ -n $target ]] || { echo "Usage: $0 --protected <target>" >&2; exit 1; }
findmnt -R "$target" >/dev/null 2>&1 && umount -R "$target" || true
exit 0
fi
disk="${1:-}"
[[ -n $disk && -b $disk ]] || { echo "Need a block device argument; got '$disk'" >&2; exit 1; }