diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-31 18:23:52 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-31 18:23:52 +0000 |
commit | 38007c800fe18a7993e778ce77c36cf5b66271df (patch) | |
tree | f3a1a5a88064788149faca824bb00e5e686b39b4 | |
parent | fde6e904bfafda06a31a2d02db9a3ef74810fc0a (diff) | |
download | mpv-38007c800fe18a7993e778ce77c36cf5b66271df.tar.bz2 mpv-38007c800fe18a7993e778ce77c36cf5b66271df.tar.xz |
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
-rwxr-xr-x | version.sh | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/version.sh b/version.sh index f76ab454e7..d2209b52a3 100755 --- a/version.sh +++ b/version.sh @@ -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 |