[Mplayer-cvslog] CVS: main version.sh,1.10,1.11

Alex Beregszaszi alex at mplayerhq.hu
Tue Dec 31 19:23:55 CET 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv17252

Modified Files:
	version.sh 
Log Message:
better BSD/OS support by Steven Schultz <sms at 2bsd.com>

Index: version.sh
===================================================================
RCS file: /cvsroot/mplayer/main/version.sh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- version.sh	20 Sep 2002 15:46:13 -0000	1.10
+++ version.sh	31 Dec 2002 18:23:52 -0000	1.11
@@ -1,13 +1,28 @@
 #!/bin/sh
 
-last_cvs_update=`date -r CVS/Entries +%y%m%d-%H:%M 2>/dev/null`
-if test $? -ne 0 ; then
-        # probably no gnu date installed(?), use current date
-        last_cvs_update=`date +%y%m%d-%H:%M`
-elif test `uname -s` = 'Darwin' ; then
+OS=`uname -s`
+case "$OS" in
+     Linux)
+	last_cvs_update=`date -r CVS/Entries +%y%m%d-%H:%M 2>/dev/null`
+	;;
+     BSD/OS)
+	LS=`ls -lT CVS/Entries`
+	month=`echo $LS | awk -F" " '{print $6}'`
+	day=`echo $LS | awk -F" " '{print $7}'`
+	hms=`echo $LS | awk -F" " '{print $8}'`
+	hour=`echo $hms | awk -F":" '{print $1}'`
+	minute=`echo $hms | awk -F":" '{print $2}'`
+	year=`echo $LS | awk -F" " '{print $9}'`
+	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`
-fi
+	last_cvs_update=`date +%y%m%d-%H:%M`
+	;;
+     *)
+	last_cvs_update=`date +%y%m%d-%H:%M`
+	;;
+esac
 
 extra=""
 if test "$1" ; then




More information about the MPlayer-cvslog mailing list