mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
better BSD/OS support by Steven Schultz <sms@2bsd.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8688 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
fde6e904bf
commit
38007c800f
29
version.sh
29
version.sh
@ -1,13 +1,28 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
last_cvs_update=`date -r CVS/Entries +%y%m%d-%H:%M 2>/dev/null`
|
OS=`uname -s`
|
||||||
if test $? -ne 0 ; then
|
case "$OS" in
|
||||||
# probably no gnu date installed(?), use current date
|
Linux)
|
||||||
last_cvs_update=`date +%y%m%d-%H:%M`
|
last_cvs_update=`date -r CVS/Entries +%y%m%d-%H:%M 2>/dev/null`
|
||||||
elif test `uname -s` = 'Darwin' ; then
|
;;
|
||||||
|
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
|
# darwin's date has different meaning for -r
|
||||||
last_cvs_update=`date +%y%m%d-%H:%M`
|
last_cvs_update=`date +%y%m%d-%H:%M`
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
last_cvs_update=`date +%y%m%d-%H:%M`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
extra=""
|
extra=""
|
||||||
if test "$1" ; then
|
if test "$1" ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user