Files
notfiles/scripts/tests/usb_driver.sh
T

10 lines
384 B
Bash
Executable File

#!/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 "$@"