make sure python and gawk are available
[releases.git] / mkgitrel.pre
index f967e11114f6598de25a16be22f443417778b777..9ab959b0372ca31fa11465a26bbe16f79fd1ac1e 100755 (executable)
@@ -32,6 +32,10 @@ do
 
 . $scriptdir/mkgitrel.setprev &&
 
+  # Make sure python and gawk are available.
+  ${PYTHON-python} --version &&
+  ${AWK-gawk} --re-interval --version &&
+
   case $rel in
   v*)
     echo $rel starts with v, that is unexpected >&2
@@ -68,6 +72,23 @@ for d in sources/v$rel logs/v$rel; do
   fi
 done &&
 
+for d in $reldir/$rel; do
+  if test -d $d; then
+    echo directory $d already exists, cannot proceed >&2
+    success=false
+  fi
+done &&
+
+for d in sources logs scripts incr; do
+  if git rev-parse --verify -q $d/v$rel >&2; then
+    echo tag $d/v$rel already exists, it needs to be cleaned up first >&2
+    success=false
+  elif git rev-parse --verify -q public/$d/v$rel >&2; then
+    echo tag public/$d/v$rel already exists, cannot proceed >&2
+    success=false
+  fi
+done &&
+
 for f in linux-libre-$rel.check linux-libre-$rel.patck; do
   if test -f $f; then
     echo warning: file $f already exists >&2
@@ -92,7 +113,7 @@ for f in scripts/v$rel/.* scripts/v$rel/*; do
   case $f in
   scripts/"v$rel"/. | \
   scripts/"v$rel"/.. | \
-  scripts/"v$rel"/.gitx | \
+  scripts/"v$rel"/.git | \
   scripts/"v$rel"/COPYING | \
   scripts/"v$rel"/deblob-"$cbr" | \
   scripts/"v$rel"/deblob-check) ;;