Mercurial > mplayer.hg
annotate version.sh @ 12189:bd67f85c6440
-rdynamic is not supported on windows
author | faust3 |
---|---|
date | Tue, 13 Apr 2004 10:02:37 +0000 |
parents | e209ca6a0b3e |
children | 7a2d85a8da98 |
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 |
11509 | 5 CYGWIN*) |
6 last_cvs_update=`date -r CVS/Entries +%y%m%d-%H:%M 2>/dev/null` | |
7 ;; | |
8687
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
8 Linux) |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
9 last_cvs_update=`date -r CVS/Entries +%y%m%d-%H:%M 2>/dev/null` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
10 ;; |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
11 BSD/OS) |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
12 LS=`ls -lT CVS/Entries` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
13 month=`echo $LS | awk -F" " '{print $6}'` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
14 day=`echo $LS | awk -F" " '{print $7}'` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
15 hms=`echo $LS | awk -F" " '{print $8}'` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
16 hour=`echo $hms | awk -F":" '{print $1}'` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
17 minute=`echo $hms | awk -F":" '{print $2}'` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
18 year=`echo $LS | awk -F" " '{print $9}'` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
19 last_cvs_update="${year}${month}${day}-${hour}:${minute}" |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
20 ;; |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
21 Darwin) |
5949 | 22 # darwin's date has different meaning for -r |
8687
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
23 last_cvs_update=`date +%y%m%d-%H:%M` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
24 ;; |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
25 *) |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
26 last_cvs_update=`date +%y%m%d-%H:%M` |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
27 ;; |
93694559178c
better BSD/OS support by Steven Schultz <sms@2bsd.com>
alex
parents:
7448
diff
changeset
|
28 esac |
3292
7fa3a928631a
not it looks like this 'MPlayer CVS-011203-19:47-gcc-2.95.3'
jaf
parents:
1621
diff
changeset
|
29 |
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
|
30 extra="" |
7448
b464616d40b5
Should be: if test ; then - D Richard Felker III <dalias@aerifal.cx>
alex
parents:
7447
diff
changeset
|
31 if test "$1" ; then |
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
|
32 extra="-$1" |
a49219323787
moved to to avoid CVS-XXYYZZ- versions (if no given) - altought this comment is bigger than the patch :)
alex
parents:
5949
diff
changeset
|
33 fi |
10421 | 34 echo "#define VERSION \"dev-CVS-${last_cvs_update}${extra}\"" >version.h |