Line | |
---|
1 | user_agent_prefix=`grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep user_agent_prefix | cut -d , -f 6` |
---|
2 | |
---|
3 | peer_id_prefix=`grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep peer_id_prefix | cut -d , -f 6` |
---|
4 | |
---|
5 | if [ -d .svn ]; then |
---|
6 | svn_revision=`svnversion | sed -r 's/([0-9]+).*/\1/' ` |
---|
7 | else |
---|
8 | svn_revision=`grep -oh '\$Id: [^ ]\+ [0-9]\+' */*\.cc */*\.cpp */*\.[chm] | cut -d ' ' -f 3 | sort | tail -n 1 -` |
---|
9 | fi |
---|
10 | |
---|
11 | cat > libtransmission/version.h << EOF |
---|
12 | #define PEERID_PREFIX "${peer_id_prefix}" |
---|
13 | #define USERAGENT_PREFIX "${user_agent_prefix}" |
---|
14 | #define SVN_REVISION "${svn_revision}" |
---|
15 | #define SVN_REVISION_NUM ${svn_revision} |
---|
16 | #define SHORT_VERSION_STRING "${user_agent_prefix}" |
---|
17 | #define LONG_VERSION_STRING "${user_agent_prefix} (${svn_revision})" |
---|
18 | EOF |
---|
Note: See
TracBrowser
for help on using the repository browser.