diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-05-18 21:55:52 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-05-18 21:55:52 +0000 |
commit | a7dc941319c9234e8fafccead6e1f2e1d2c6ab25 (patch) | |
tree | fa3642e353167104bf3e1f6f8f70f4db883df61d /version.sh | |
parent | 35277c2e40ec385049ea02e1378cc030831213e4 (diff) | |
download | mpv-a7dc941319c9234e8fafccead6e1f2e1d2c6ab25.tar.bz2 mpv-a7dc941319c9234e8fafccead6e1f2e1d2c6ab25.tar.xz |
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>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15512 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'version.sh')
-rwxr-xr-x | version.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/version.sh b/version.sh index d98731e982..c8abc678ca 100755 --- a/version.sh +++ b/version.sh @@ -19,8 +19,15 @@ case "$OS" in 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` |