Update of /cvsroot/linux-vax/toolchain/scripts
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv13825
Modified Files:
compare_buildlog.sh
Log Message:
* Should work with POSIX sh.
* Don't leak tempfiles.
Index: compare_buildlog.sh
===================================================================
RCS file: /cvsroot/linux-vax/toolchain/scripts/compare_buildlog.sh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- compare_buildlog.sh 25 Oct 2006 08:32:31 -0000 1.10
+++ compare_buildlog.sh 7 Jul 2007 17:09:24 -0000 1.11
@@ -1,7 +1,4 @@
-#!/usr/bin/env bash
-
-TEMP1FILE="`_Tempfile`"
-TEMP2FILE="`_Tempfile`"
+#!/usr/bin/env sh
function cleanup() {
sed -e 's/[[:digit:]]\{8\}-[[:digit:]]\{6\}/xxxxxxxx-xxxxxx/g' |
@@ -27,10 +24,12 @@
exit 1
fi
+TEMP1FILE="`_Tempfile`"
+TEMP2FILE="`_Tempfile`"
+
[ -r "${1}" ] && cat "$1" | cleanup > "${TEMP1FILE}"
[ -r "${2}" ] && cat "$2" | cleanup > "${TEMP2FILE}"
_Diff "${TEMP1FILE}" "${TEMP2FILE}"
-rm -f "${TEMP1FILE}" "${TEMP2FILE}"
-
+rm -f -- "${TEMP1FILE}" "${TEMP2FILE}"
|