From a7dc941319c9234e8fafccead6e1f2e1d2c6ab25 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 18 May 2005 21:55:52 +0000 Subject: Make version string depend of the last change of CVS/Entries for Darwin. loosely based on a patch by Chris Roccati git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15512 b3059339-0415-0410-9bf9-f77b7e298cf2 --- version.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'version.sh') diff --git a/version.sh b/version.sh index d98731e982..c8abc678ca 100755 --- a/version.sh +++ b/version.sh @@ -19,8 +19,15 @@ case "$OS" in 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` -- cgit v1.2.3