changeset 15511:7a2d85a8da98

Make version string depend of the last change of CVS/Entries for Darwin. loosely based on a patch by Chris Roccati <roccati at pobox dot com>
author diego
date Wed, 18 May 2005 21:55:52 +0000
parents 97a0be4ec817
children 539bc90e2fe5
files version.sh
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/version.sh	Wed May 18 19:04:29 2005 +0000
+++ b/version.sh	Wed May 18 21:55:52 2005 +0000
@@ -19,8 +19,15 @@
 	last_cvs_update="${year}${month}${day}-${hour}:${minute}"
 	;;
      Darwin) 
-        # darwin's date has different meaning for -r
-	last_cvs_update=`date +%y%m%d-%H:%M`
+	# Darwin/BSD 'date -r' does not print modification time
+	LS=`ls -lT CVS/Entries`
+	year=`echo $LS | cut -d' ' -f9 | cut -c 3-4`
+	month=`echo $LS | awk -F" " '{printf "%.2d", \
+		(index("JanFebMarAprMayJunJulAugSepOctNovDec",$7)+2)/3}'`
+	day=`echo $LS | cut -d' ' -f6`
+	hour=`echo $LS | cut -d' ' -f8 | cut -d: -f1`
+	minute=`echo $LS | cut -d' ' -f8 | cut -d: -f2`
+	last_cvs_update="${year}${month}${day}-${hour}:${minute}"
 	;;
      *)
 	last_cvs_update=`date +%y%m%d-%H:%M`