]> piware.de Git - bin.git/commitdiff
makechroot: check argument presence
authorMartin Pitt <martin.pitt@ubuntu.com>
Tue, 13 Feb 2007 10:07:33 +0000 (11:07 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 13 Feb 2007 10:07:33 +0000 (11:07 +0100)
makechroot

index 1028c213ba6e197a3531a86c2ee867036afffb51..c9ad108c0f2d6c3c4c5d875f0cfeeca3026ed0c8 100755 (executable)
@@ -3,6 +3,11 @@ DIST="$1"
 DIR="$2"
 MIRROR="$3"
 
+[ "$DIST" ] && [ "$DIR" ] && [ "$MIRROR" ] || {
+    echo "Usage: $0 <dist> <directory> <mirror>" >&2
+    exit 1
+}
+
 mkdir -p "$DIR"
 debootstrap "$DIST" "$DIR" "$MIRROR"