svn commit: samba r19119 - in branches/SAMBA_3_0/source/script/tests: .

metze at samba.org metze at samba.org
Fri Oct 6 10:14:56 GMT 2006


Author: metze
Date: 2006-10-06 10:14:56 +0000 (Fri, 06 Oct 2006)
New Revision: 19119

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19119

Log:
try to be more portable...

metze
Modified:
   branches/SAMBA_3_0/source/script/tests/gdb_backtrace


Changeset:
Modified: branches/SAMBA_3_0/source/script/tests/gdb_backtrace
===================================================================
--- branches/SAMBA_3_0/source/script/tests/gdb_backtrace	2006-10-06 09:26:29 UTC (rev 19118)
+++ branches/SAMBA_3_0/source/script/tests/gdb_backtrace	2006-10-06 10:14:56 UTC (rev 19119)
@@ -7,23 +7,23 @@
 
 BASENAME=`basename $0`
 
-test -z ${GDB_BIN} && GDB_BIN=`type -p gdb`
-if [ -z "${GDB_BIN}" ]; then
-	echo "ERROR: ${BASENAME} needs an installed gdb. "
+PID=$1
+if [ x"$PID" = x"" ]; then
+	echo "ERROR: ${BASENAME} needs a PID. "
 	exit 1
 fi
 
-if [ -z $1 ]; then
-	echo "ERROR: ${BASENAME} needs a PID. "
+test x"${GDB_BIN}" = x"" && GDB_BIN=`type -p gdb`
+if [ x"${GDB_BIN}" = x"" ]; then
+	echo "ERROR: ${BASENAME} needs an installed gdb. "
 	exit 1
 fi
-PID=$1
 
 # use /dev/shm as default temp directory
 test -d /dev/shm && \
 	TMP_BASE_DIR=/dev/shm || \
 	TMP_BASE_DIR=/var/tmp
-TMPFILE=$( mktemp -p ${TMP_BASE_DIR} backtrace.XXXXXX)
+TMPFILE=`mktemp -p ${TMP_BASE_DIR} backtrace.XXXXXX`
 if [ $? -ne 0 ]; then
 	echo "ERROR: ${basename} can't create temp file in ${TMP_BASE_DIR}. "
 	exit 1



More information about the samba-cvs mailing list