Changeset 1036 for trunk


Ignore:
Timestamp:
Oct 28, 2006, 4:51:28 PM (15 years ago)
Author:
titer
Message:

Tweaked version.sh (much faster on BeOS)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/version.sh

    r620 r1036  
    44
    55# Get current SVN revision from Ids in all source files
    6 REVMAX=0
    7 for pattern in '*.[chm]' '*.cpp' '*.po' '*.mk' '*.in' 'Makefile' 'configure'; do
    8   for f in `find . -name "$pattern"`; do
    9     REV=`sed -e '/\$Id:/!d' -e \
    10          's/.*\$Id: [^ ]* \([0-9]*\) .*/\1/' \
    11          $f`
    12     if [ -n "$REV" ]; then
    13       if [ "$REV" -gt "$REVMAX" ]; then
    14         REVMAX="$REV"
    15       fi
    16     fi
    17   done
    18 done
    19 
     6REVMAX=`( find . '(' -name '*.[chm]' -o -name '*.cpp' -o -name '*.po' \
     7            -o -name '*.mk' -o -name '*.in' -o -name 'Makefile' \
     8            -o -name 'configure' ')' -exec cat '{}' ';' ) | \
     9          sed -e '/\$Id:/!d' -e \
     10            's/.*\$Id: [^ ]* \([0-9]*\) .*/\1/' |
     11          awk 'BEGIN { REV=0 }
     12               //    { if ( $1 > REV ) REV=$1 }
     13               END   { print REV }'`
     14 
    2015# Generate files to be included: only overwrite them if changed so make
    2116# won't rebuild everything unless necessary
Note: See TracChangeset for help on using the changeset viewer.