From 246dff73a44090eeaeaa1addf1115d35033684a8 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 6 Dec 2008 15:06:59 +0000 Subject: [PATCH] #1570 Streamlined macosx/version.sh --- NEWS | 2 +- macosx/version.sh | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index 44241ea62..fd5dd2432 100644 --- a/NEWS +++ b/NEWS @@ -8,7 +8,7 @@ NEWS file for Transmission + Support BitTorrent Enhancement Proposal #21 "Extension for Partial Seeds" - Mac + Groups (moved to preferences) can have a default location when adding transfers - + Bonjour support for web interface + + Bonjour support for the web interface - GTK+ + Minor display improvements and HIG compliance diff --git a/macosx/version.sh b/macosx/version.sh index 041744ac8..44d42cb38 100755 --- a/macosx/version.sh +++ b/macosx/version.sh @@ -10,22 +10,11 @@ PEERID_PREFIX="-TR140Z-" USERAGENT_PREFIX="1.40+" -SVN_REVISION=`find ./libtransmission -name "*\.[chmp]" -o -name "*\.cpp" -o -name "*\.po" -o -name "*\.sh" | \ - xargs grep "\$Id:" | \ - grep -v third-party | \ - cut -d"$Id:" -f3 | cut -d" " -f3 | sort -n | tail -n 1` +SVN_REVISION=`find -E ./libtransmission ./macosx \ + -regex ".*\.([chmp]|cpp|po|sh)" \ + -exec grep -oh '\$Id: [^ ]\+ [0-9]\+' {} + \ + | awk '{ if ($3 > max) max = $3} END { print max }'` -#dirty fix to ensure the highest version number is found when running release_builder.sh -SVN_REVISION_MAC=`find ./macosx -name "*\.[chmp]" -o -name "*\.cpp" -o -name "*\.po" -o -name "*\.sh" | \ - xargs grep "\$Id:" | \ - grep -v third-party | \ - cut -d"$Id:" -f3 | cut -d" " -f3 | sort -n | tail -n 1` - -if [ $SVN_REVISION_MAC -gt $SVN_REVISION ] -then - SVN_REVISION=$SVN_REVISION_MAC -fi - # Generate files to be included: only overwrite them if changed so make # won't rebuild everything unless necessary replace_if_differs ()