Ticket #1570: svn-version.patch
File svn-version.patch, 1.3 KB (added by ciaran, 12 years ago) |
---|
-
macosx/version.sh
10 10 PEERID_PREFIX="-TR140Z-" 11 11 USERAGENT_PREFIX="1.40+" 12 12 13 SVN_REVISION=`find ./libtransmission -name "*\.[chmp]" -o -name "*\.cpp" -o -name "*\.po" -o -name "*\.sh" |\14 xargs grep "\$Id:" |\15 grep -v third-party |\16 cut -d"$Id:" -f3 | cut -d" " -f3 | sort -n | tail -n 1`13 SVN_REVISION=`find -E ./libtransmission ./macosx \ 14 -regex ".*\.([chmp]|cpp|po|sh)" \ 15 -exec grep -oh '\$Id: [^ ]\+ [0-9]\+' {} + \ 16 | awk '{ if ($3 > max) max = $3} END { print max }'` 17 17 18 #dirty fix to ensure the highest version number is found when running release_builder.sh19 SVN_REVISION_MAC=`find ./macosx -name "*\.[chmp]" -o -name "*\.cpp" -o -name "*\.po" -o -name "*\.sh" | \20 xargs grep "\$Id:" | \21 grep -v third-party | \22 cut -d"$Id:" -f3 | cut -d" " -f3 | sort -n | tail -n 1`23 24 if [ $SVN_REVISION_MAC -gt $SVN_REVISION ]25 then26 SVN_REVISION=$SVN_REVISION_MAC27 fi28 29 18 # Generate files to be included: only overwrite them if changed so make 30 19 # won't rebuild everything unless necessary 31 20 replace_if_differs ()