[MPlayer-cvslog] CVS: main version.sh,1.14,1.15

Diego Biurrun CVS syncmail at mplayerhq.hu
Wed May 18 23:55:54 CEST 2005


CVS change done by Diego Biurrun CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv29001

Modified Files:
	version.sh 
Log Message:
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>


Index: version.sh
===================================================================
RCS file: /cvsroot/mplayer/main/version.sh,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- version.sh	23 Nov 2003 16:53:03 -0000	1.14
+++ version.sh	18 May 2005 21:55:52 -0000	1.15
@@ -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`




More information about the MPlayer-cvslog mailing list