diff -Naur a/util/genmsgidx b/util/genmsgidx --- a/util/genmsgidx 2011-12-28 11:58:04.399319906 +0000 +++ b/util/genmsgidx 2011-12-28 12:09:01.852424013 +0000 @@ -34,7 +34,8 @@ esac done -BASEDIR=${BASEDIR:=$basedir} +BASEDIR="${BASEDIR:=$basedir}" +BASEDIR="${BASEDIR%/}" export BASEDIR findcmd() @@ -96,7 +97,7 @@ haveallof variables BASEDIR || exit 1 # Clear idx file and detect error -> $BASEDIR/doc/explain.idx && { +> "${BASEDIR}/doc/explain.idx" || { echo "Error: Cannot write over the index file $BASEDIR/doc/explain.idx. Aborting" exit 1 }