commit b5228bae462901c3aec494a77084b6c44503ac24
parent 8363d8251bb4401ab85af8c74084b87d1604fc59
Author: sin <sin@2f30.org>
Date: Fri, 18 Apr 2014 13:08:18 +0100
Refuse to run create-bootable if $ROOT is not set
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/stuff/create-bootable b/stuff/create-bootable
@@ -2,9 +2,17 @@
#
# Ensure you've loaded the loop module with max_part=15
-if test "$2" = ""; then
+usage() {
echo "Usage: $0 <rootdir> <imgfile>"
exit
+}
+
+if test "$1" = ""; then
+ usage
+fi
+
+if test "$2" = ""; then
+ usage
fi
set -e -x