# HG changeset patch # User diego # Date 1116453352 0 # Node ID 7a2d85a8da98fcb38ea88ee756d235e047d33ee3 # Parent 97a0be4ec8172bc582291f19b24da25300a32896 Make version string depend of the last change of CVS/Entries for Darwin. loosely based on a patch by Chris Roccati diff -r 97a0be4ec817 -r 7a2d85a8da98 version.sh --- 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`