mkversion.sh: printf %s is more portable than echo -e
[ira/wip.git] / source4 / script / mkrelease.sh
index e6b6c2af0774eea34b27003667d62be37a3fa08f..0af738deb52e3a647c4ad634f99e339ef42c8511 100755 (executable)
@@ -1,5 +1,11 @@
 #!/bin/sh
 
+if [ ! -d ".git" -o `dirname $0` != "./source/script" ]; then
+       echo "Run this script from the top-level directory in the"
+       echo "repository as: ./source/script/mkrelease.sh"
+       exit 1
+fi
+
 TMPDIR=`mktemp -d samba-XXXXX`
 (git archive --format=tar HEAD | (cd $TMPDIR/ && tar xf -))