Mercurial > mplayer.hg
annotate version.sh @ 16548:6447ada9024e
synced with 1.70
author | gabrov |
---|---|
date | Thu, 22 Sep 2005 19:57:14 +0000 |
parents | 8fc10647e146 |
children | ff09faee7c14 |
rev | line source |
---|---|
420 | 1 #!/bin/sh |
2 | |
8687
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
3 OS=`uname -s` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
4 case "$OS" in |
15668 | 5 CYGWIN*|Linux|MINGW*) |
15650 | 6 last_cvs_update=`date -r CVS/Entries +%y%m%d-%H:%M 2>/dev/null` |
7 ;; | |
15666
5fa1221fb597
BSD/OS works same as the other BSDs, tested by Steven M. Schultz.
diego
parents:
15650
diff
changeset
|
8 Darwin|*BSD*) |
15650 | 9 # BSD 'date -r' does not print modification time |
10 # LC_ALL=C sets month/day order and English language in the date string | |
11 # The if in the awk call works around wrong day/month order. | |
12 last_cvs_update=`LC_ALL=C ls -lT CVS/Entries | \ | |
13 awk '{ \ | |
14 day=$7; \ | |
15 month=index(" JanFebMarAprMayJunJulAugSepOctNovDec", $6); \ | |
16 if(month==0) { \ | |
17 day=$6; \ | |
18 month=index(" JanFebMarAprMayJunJulAugSepOctNovDec",$7); } \ | |
19 printf("%s%.02d%.02d-%s", \ | |
20 substr($9, 3, 2), (month+1)/3, day, substr($8, 0, 5)); \ | |
21 }'` | |
22 ;; | |
23 *) | |
24 last_cvs_update=`date +%y%m%d-%H:%M` | |
25 ;; | |
8687
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
26 esac |
3292
7fa3a928631a
not it looks like this 'MPlayer CVS-011203-19:47-gcc-2.95.3'
jaf
parents:
1621
diff
changeset
|
27 |
7447
a49219323787
moved to to avoid CVS-XXYYZZ- versions (if no given) - altought this comment is bigger than the patch :)
alex
parents:
5949
diff
changeset
|
28 extra="" |
7448
b464616d40b5
Should be: if test ; then - D Richard Felker III <dalias@aerifal.cx>
alex
parents:
7447
diff
changeset
|
29 if test "$1" ; then |
15650 | 30 extra="-$1" |
7447
a49219323787
moved to to avoid CVS-XXYYZZ- versions (if no given) - altought this comment is bigger than the patch :)
alex
parents:
5949
diff
changeset
|
31 fi |
10421 | 32 echo "#define VERSION \"dev-CVS-${last_cvs_update}${extra}\"" >version.h |