feat: improve scripts and write tests

This commit is contained in:
alexm committed 2026-10-11 07:22:13 -04:00
1 parent bc3091647e
commit cf4bd07a8e
32 files changed
+3817 -723

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Test driver: load make-usb.sh as a library (its main is guarded), swap the
# two functions that need real privileges / a real /dev node, then run main
# exactly as a user would.
# shellcheck source=../make-usb.sh
source "${SCRIPTS:?}/make-usb.sh"
is_block_device() { [[ -e "$1" ]]; }
ensure_root() { :; } # tests never need (or want) a real sudo
main "$@"