Last change
on this file since 8577 was
8577,
checked in by charles, 13 years ago
|
(trunk) another update-version-h.sh portability update, this time from geirha: "grep -o" isn't posix
|
-
Property svn:executable set to
*
|
File size:
811 bytes
|
Line | |
---|
1 | echo "creating libtransmission/version.h" |
---|
2 | |
---|
3 | user_agent_prefix=`grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep user_agent_prefix | cut -d , -f 6` |
---|
4 | |
---|
5 | peer_id_prefix=`grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep peer_id_prefix | cut -d , -f 6` |
---|
6 | |
---|
7 | if [ -d .svn ]; then |
---|
8 | svn_revision=`svnversion -n | cut -d: -f1 | cut -dM -f1 | cut -dS -f1` |
---|
9 | else |
---|
10 | svn_revision=`awk '/\$Id: /{ if ($4>i) i=$4 } END {print i}' */*.{cc,[chm]}` |
---|
11 | fi |
---|
12 | |
---|
13 | cat > libtransmission/version.h << EOF |
---|
14 | #define PEERID_PREFIX "${peer_id_prefix}" |
---|
15 | #define USERAGENT_PREFIX "${user_agent_prefix}" |
---|
16 | #define SVN_REVISION "${svn_revision}" |
---|
17 | #define SVN_REVISION_NUM ${svn_revision} |
---|
18 | #define SHORT_VERSION_STRING "${user_agent_prefix}" |
---|
19 | #define LONG_VERSION_STRING "${user_agent_prefix} (${svn_revision})" |
---|
20 | EOF |
---|
Note: See
TracBrowser
for help on using the repository browser.