[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog sanity.sh
From: |
Larry Jones |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog sanity.sh |
Date: |
Tue, 18 Nov 2008 18:38:46 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Larry Jones <scjones> 08/11/18 18:38:46
Modified files:
src : ChangeLog sanity.sh
Log message:
* sanity.sh: Fix nonportable date +%s'' test.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3633&r2=1.3634
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1216&r2=1.1217
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3633
retrieving revision 1.3634
diff -u -b -r1.3633 -r1.3634
--- ChangeLog 17 Nov 2008 21:18:02 -0000 1.3633
+++ ChangeLog 18 Nov 2008 18:38:45 -0000 1.3634
@@ -1,3 +1,7 @@
+2008-11-18 Larry Jones <address@hidden>
+
+ * sanity.sh: Fix nonportable ``date +%s'' test.
+
2008-11-17 Larry Jones <address@hidden>
* rcs.c (findmagictag): Don't try to do arithmetic on void *.
Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1216
retrieving revision 1.1217
diff -u -b -r1.1216 -r1.1217
--- sanity.sh 5 Nov 2008 18:17:37 -0000 1.1216
+++ sanity.sh 18 Nov 2008 18:38:45 -0000 1.1217
@@ -1287,6 +1287,9 @@
fi
fi
+TR=`find_tool tr ${TR}:gtr version_test tr_tooltest1`
+echo "Using TR=$TR" >>$LOGFILE
+
# In the best of all possible worlds, date +%s prints the number
# of seconds since the epoch.
@@ -1297,10 +1300,14 @@
datenum=`expr $datenum + 1`
echo $datenum
}
-case `date +%s` in
-%s) echo "WARNING: date does not support +%s format properly."
- BINDATE=date_s_emulate;;
-[0-9]+) BINDATE=date;;
+case `date +%s 2>&1 | ${TR} -d '[0-9]'` in
+ "")
+ BINDATE=date
+ ;;
+ *)
+ echo "WARNING: date does not support +%s format properly."
+ BINDATE=date_s_emulate
+ ;;
esac
valgrind_lastlog=''
@@ -1420,9 +1427,6 @@
return 0
}
-TR=`find_tool tr ${TR}:gtr version_test tr_tooltest1`
-echo "Using TR=$TR" >>$LOGFILE
-
# MacOS X (10.2.8) has a /bin/ls that does not work correctly in that
# it will return true even if the wildcard argument does not match any
# files.