source: trunk/update-version-h.sh @ 8573

Last change on this file since 8573 was 8573, checked in by charles, 13 years ago

(trunk) tweak r8572.

  • Property svn:executable set to *
File size: 789 bytes
Line 
1user_agent_prefix=`grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep user_agent_prefix  | cut -d , -f 6`
2
3peer_id_prefix=`grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep peer_id_prefix  | cut -d , -f 6`
4
5if [ -d .svn ]; then
6    svn_revision=`svnversion | sed -r 's/([0-9]+).*/\1/' `
7else
8    svn_revision=`grep -oh '\$Id: [^ ]\+ [0-9]\+' */*\.cc */*\.cpp */*\.[chm] | cut -d ' ' -f 3 | sort | tail -n 1 -`
9fi
10
11cat > 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})"
18EOF
Note: See TracBrowser for help on using the repository browser.