Ticket #1570: svn-version.patch

File svn-version.patch, 1.3 KB (added by ciaran, 12 years ago)
  • macosx/version.sh

     
    1010PEERID_PREFIX="-TR140Z-"
    1111USERAGENT_PREFIX="1.40+"
    1212
    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`
     13SVN_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 }'`
    1717
    18 #dirty fix to ensure the highest version number is found when running release_builder.sh
    19 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 then
    26         SVN_REVISION=$SVN_REVISION_MAC
    27 fi
    28  
    2918# Generate files to be included: only overwrite them if changed so make
    3019# won't rebuild everything unless necessary
    3120replace_if_differs ()