[MPlayer-cvslog] CVS: main version.sh,1.16,1.17

Diego Biurrun CVS syncmail at mplayerhq.hu
Sat May 21 16:44:13 CEST 2005


CVS change done by Diego Biurrun CVS

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

Modified Files:
	version.sh 
Log Message:
LANG=C ensures month/day order and English language in the date string for
more reliable operation in diverse environments.  Tested on OpenBSD, NetBSD,
FreeBSD, Darwin 10.2 and Darwin 10.1.  Darwin 10.4 should work as well, 10.3
does not due to broken ls.


Index: version.sh
===================================================================
RCS file: /cvsroot/mplayer/main/version.sh,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- version.sh	18 May 2005 22:33:35 -0000	1.16
+++ version.sh	21 May 2005 14:44:10 -0000	1.17
@@ -15,13 +15,14 @@
 	year=`echo $LS | awk -F" " '{print $9}'`
 	last_cvs_update="${year}${month}${day}-${hour}:${minute}"
 	;;
-     Darwin) 
-	# Darwin/BSD 'date -r' does not print modification time
-	LS=`ls -lT CVS/Entries`
+     Darwin|*BSD) 
+	# BSD 'date -r' does not print modification time
+	# LANG=C sets month/day order and English language in the date string
+	LS=`LANG=C 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`
+		(index("JanFebMarAprMayJunJulAugSepOctNovDec",$6)+2)/3}'`
+	day=`echo $LS | cut -d' ' -f7`
 	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}"




More information about the MPlayer-cvslog mailing list