diff -ubrN MUMmer3.20/scripts.orig/exact-tandems.sh MUMmer3.20/scripts/exact-tandems.sh
--- MUMmer3.20/scripts.orig/exact-tandems.sh	1970-01-01 01:00:00.000000000 +0100
+++ MUMmer3.20/scripts/exact-tandems.sh	2007-11-12 13:12:31.000000000 +0100
@@ -0,0 +1,34 @@
+#!/bin/sh -e
+#
+# Find exact tandem repeats in specified file involving an
+# exact duplicate of at least the specified length
+
+usage () {
+    echo "Usage: `basename $0` <file> <min-match-len>"
+    return 67 # EX_USAGE
+}
+
+if [ $# -ne 2 ] ; then
+    echo "You provided $# arguments instead of 2."
+    usage
+fi
+
+filename="$1"
+matchlen="$2"
+
+bindir=__BIN_DIR
+scriptdir=__SCRIPT_DIR
+
+if  [ ! -e "$filename"  ] ; then
+    echo "File $filename does not exist."
+    usage
+fi
+
+echo "Finding matches"
+$bindir/repeat-match -t -n $matchlen "$filename" | tail +3 > $$.tmp.matches
+# This is default behavior when shell started with -e
+# if  ($status != 0)  exit -1
+
+echo "Tandem repeats"
+sort -k1n -k2n $$.tmp.matches | awk -f $scriptdir/tandem-repeat.awk
+rm -f $$.tmp.matches
diff -ubrN MUMmer3.20/scripts.orig/Makefile MUMmer3.20/scripts/Makefile
--- MUMmer3.20/scripts.orig/Makefile	2007-07-13 19:06:57.000000000 +0200
+++ MUMmer3.20/scripts/Makefile	2007-11-12 13:15:01.000000000 +0100
@@ -7,9 +7,18 @@
 ifndef AUX_BIN_DIR
 AUX_BIN_DIR := $(CURDIR)
 endif
+ifndef INSTALL_AUX_BIN_DIR
+INSTALL_AUX_BIN_DIR := $(AUX_BIN_DIR)
+endif
 ifndef SCRIPT_DIR
 SCRIPT_DIR := $(CURDIR)
 endif
+ifndef INSTALL_BIN_DIR
+INSTALL_BIN_DIR := $(BIN_DIR)
+endif
+ifndef INSTALL_SCRIPT_DIR
+INSTAL_SCRIPT_DIR := $(SCRIPT_DIR)
+endif
 
 SCRIPT_DIR := $(CURDIR)
 SED := $(filter /%,$(shell /bin/sh -c 'type sed'))
@@ -29,68 +38,24 @@
 
 clean:
 	rm -f *~
-	cd $(BIN_DIR); rm -f $(ALL)
-
-
+	( cd $(BIN_DIR); rm -f $(ALL) )
 
+#-- replace variables by real path names --#
 
-#-- not so PHONY rules --#
-exact-tandems: exact-tandems.csh
-	$(SED)  -e 's?__CSH_PATH?$(CSH)?g' \
-		-e 's?__BIN_DIR?$(BIN_DIR)?g' \
-		-e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
-		exact-tandems.csh > $(BIN_DIR)/exact-tandems
-	chmod 755 $(BIN_DIR)/exact-tandems
+%:
+	$(SED)  -e 's?__AUX_BIN_DIR?$(INSTALL_AUX_BIN_DIR)?g' \
+		-e 's?__BIN_DIR?$(INSTALL_BIN_DIR)?g' \
+		-e 's?__PERL_PATH?$(PERL)?g' \
+		-e 's?__SCRIPT_DIR?$(INSTALL_SCRIPT_DIR)?g' \
+		$< > $(BIN_DIR)/$@
+	chmod 755 $(BIN_DIR)/$@
 
+exact-tandems: exact-tandems.sh
 mapview: mapview.pl
-	$(SED)  -e 's?__PERL_PATH?$(PERL)?g' \
-		-e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
-                mapview.pl > $(BIN_DIR)/mapview
-	chmod 755 $(BIN_DIR)/mapview
-
 mummerplot: mummerplot.pl Foundation.pm
-	$(SED)  -e 's?__PERL_PATH?$(PERL)?g' \
-                -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
-                -e 's?__BIN_DIR?$(BIN_DIR)?g' \
-                mummerplot.pl > $(BIN_DIR)/mummerplot
-	chmod 755 $(BIN_DIR)/mummerplot
-
 dnadiff: dnadiff.pl Foundation.pm
-	$(SED) -e 's?__PERL_PATH?$(PERL)?g' \
-               -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
-               -e 's?__BIN_DIR?$(BIN_DIR)?g' \
-                 dnadiff.pl > $(BIN_DIR)/dnadiff
-	chmod 755 $(BIN_DIR)/dnadiff
-
 nucmer: nucmer.pl Foundation.pm
-	$(SED)  -e 's?__PERL_PATH?$(PERL)?g' \
-                -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
-                -e 's?__AUX_BIN_DIR?$(AUX_BIN_DIR)?g' \
-                -e 's?__BIN_DIR?$(BIN_DIR)?g' \
-                 nucmer.pl > $(BIN_DIR)/nucmer
-	chmod 755 $(BIN_DIR)/nucmer
-
 promer: promer.pl Foundation.pm
-	$(SED)  -e 's?__PERL_PATH?$(PERL)?g' \
-                -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
-                -e 's?__AUX_BIN_DIR?$(AUX_BIN_DIR)?g' \
-                -e 's?__BIN_DIR?$(BIN_DIR)?g' \
-                promer.pl > $(BIN_DIR)/promer
-	chmod 755 $(BIN_DIR)/promer
-
-run-mummer1: run-mummer1.csh
-	$(SED)  -e 's?__CSH_PATH?$(CSH)?g' \
-		-e 's?__BIN_DIR?$(BIN_DIR)?g' \
-		run-mummer1.csh > $(BIN_DIR)/run-mummer1
-	chmod 755 $(BIN_DIR)/run-mummer1
-
-run-mummer3: run-mummer3.csh
-	$(SED)  -e 's?__CSH_PATH?$(CSH)?g' \
-		-e 's?__BIN_DIR?$(BIN_DIR)?g' \
-		run-mummer3.csh > $(BIN_DIR)/run-mummer3
-	chmod 755 $(BIN_DIR)/run-mummer3
-
+run-mummer1:   run-mummer1.sh
+run-mummer3:   run-mummer3.sh
 nucmer2xfig: nucmer2xfig.pl
-	$(SED)  -e 's?__PERL_PATH?$(PERL)?g' \
-		nucmer2xfig.pl > $(BIN_DIR)/nucmer2xfig
-	chmod 755 $(BIN_DIR)/nucmer2xfig
diff -ubrN MUMmer3.20/scripts.orig/run-mummer1.sh MUMmer3.20/scripts/run-mummer1.sh
--- MUMmer3.20/scripts.orig/run-mummer1.sh	1970-01-01 01:00:00.000000000 +0100
+++ MUMmer3.20/scripts/run-mummer1.sh	2007-11-12 13:12:31.000000000 +0100
@@ -0,0 +1,45 @@
+#!/bin/sh -e
+#
+# **SEVERELY** antiquated script for running the mummer 1 suite
+# -r option reverse complements the query sequence, coordinates of the reverse
+# matches will be relative to the reversed sequence
+#
+
+usage () {
+    echo "Usage: `basename $0` <fasta reference> <fasta query> <prefix> [-r]"
+    return 67 # EX_USAGE
+}
+
+if [ $# -ne 3 -a $# -ne 4 ] ; then
+    echo "You provided $# arguments."
+    usage
+fi
+
+ref="$1"
+qry="$2"
+pfx="$3"
+rev="$4"
+
+bindir=__BIN_DIR
+
+if  [ ! -e "$ref"  ] ; then
+    echo "File for fasta reference $ref does not exist."
+    usage
+fi
+
+if  [ ! -e "$qry"  ] ; then
+    echo "File for fasta query $qry does not exist."
+    usage
+fi
+
+if [ "$pfx" = "" ] ; then
+    usage
+fi
+
+echo "Find MUMs"
+$bindir/mummer -mum -l 20 "$rev" "$ref" "$qry" | tail +2 > "$pfx".out
+echo "Determine gaps"
+$bindir/gaps "$ref" "$rev" < "$pfx".out > "$pfx".gaps
+echo "Align gaps"
+$bindir/mummer-annotate "$pfx".gaps "$qry" > "$pfx".align
+mv witherrors.gaps "$pfx".errorsgaps
diff -ubrN MUMmer3.20/scripts.orig/run-mummer3.sh MUMmer3.20/scripts/run-mummer3.sh
--- MUMmer3.20/scripts.orig/run-mummer3.sh	1970-01-01 01:00:00.000000000 +0100
+++ MUMmer3.20/scripts/run-mummer3.sh	2007-11-12 13:12:31.000000000 +0100
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+#
+# for running the basic mummer 3 suite, should use nucmer instead when possible
+# to avoid the confusing reverse coordinate system of the raw programs.
+#
+# NOTE:  be warned that all reverse matches will then
+# be relative to the reverse complement of the query sequence.
+#
+# Edit this script as necessary to alter the matching and clustering values
+#
+
+usage () {
+    echo "Usage: `basename $0` <fasta reference> <multi-fasta query> <prefix>"
+    return 67 # EX_USAGE
+}
+
+if [ $# -ne 3 ] ; then
+    echo "You provided $# arguments."
+    usage
+fi
+
+ref="$1"
+qry="$2"
+pfx="$3"
+
+bindir=__BIN_DIR
+
+if  [ ! -e "$ref"  ] ; then
+    echo "File for fasta reference $ref does not exist."
+    usage
+fi
+
+if  [ ! -e "$qry"  ] ; then
+    echo "File for fasta query $qry does not exist."
+    usage
+fi
+
+if [ "$pfx" = "" ] ; then
+    usage
+fi
+
+echo "Find MUMs"
+$bindir/mummer -mumreference -b -l 20 "$ref" "$qry" > "$pfx".out
+echo "Determine gaps"
+$bindir/mgaps -l 100 -f .12 -s 600 < "$pfx".out > "$pfx".gaps
+echo "Align gaps"
+$bindir/combineMUMs -x -e .10 -W "$pfx".errorsgaps "$ref" "$qry" "$pfx".gaps > "$pfx".align
