X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/81d3492a6124df64bf9c96824a6ec4ea012a9714..ff3ce4da6665db0278907570309782295b21f5cc:/INSTALL/CreatePersistentImg.sh diff --git a/INSTALL/CreatePersistentImg.sh b/INSTALL/CreatePersistentImg.sh index 1dc90e6..21d65c4 100644 --- a/INSTALL/CreatePersistentImg.sh +++ b/INSTALL/CreatePersistentImg.sh @@ -18,6 +18,18 @@ print_usage() { echo '' } +print_err() { + echo "" + echo "$*" + echo "" +} + +uid=$(id -u) +if [ $uid -ne 0 ]; then + print_err "Please use sudo or run the script as root." + exit 1 +fi + while [ -n "$1" ]; do if [ "$1" = "-s" ]; then shift