diff options
Diffstat (limited to 'bdb')
-rwxr-xr-x | bdb/dist/s_recover | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bdb/dist/s_recover b/bdb/dist/s_recover index 0e8b3731c77..b0593cfc052 100755 --- a/bdb/dist/s_recover +++ b/bdb/dist/s_recover @@ -12,6 +12,13 @@ rm -f $loglist trap 'rm -f $t; exit 1' 1 2 3 13 15 +# Use the standard -k option if it works; +# otherwise fall back on the traditional notation. +if sort -k 1,1 /dev/null +then sort_2_etc='-k 2' +else sort_2_etc='+1' +fi + # Check to make sure we haven't duplicated a log record entry, and build # the list of log record types that the test suite uses. for i in $DIR; do @@ -19,13 +26,14 @@ for i in $DIR; do for f in ../$i/*.src; do # Grab the PREFIX; there should only be one per file, and # so it's okay to just take the first. - grep '^PREFIX' $f | head -1 + grep '^PREFIX' $f | sed q egrep '^DEPRECATED[ ]|^BEGIN[ ]' $f | \ awk '{print $1 "\t" $2 "\t" $3}' done done > $loglist -grep -v '^PREFIX' $loglist | awk '{print $2 "\t" $3}' | sort +1 -n | \ +grep -v '^PREFIX' $loglist | awk '{print $2 "\t" $3}' | \ + sort $sort_2_etc -n | \ uniq -d -f 1 > $t [ -s $t ] && { echo "DUPLICATE LOG VALUES:" |