#! /bin/sh 
#                               -*- Mode: Sh -*- 
# get_shlib_ver --- 
# Author           : Manoj Srivastava ( srivasta@golden-gryphon.com ) 
# Created On       : Tue Sep  1 15:27:07 2009
# Created On Node  : anzu.internal.golden-gryphon.com
# Last Modified By : Manoj Srivastava
# Status           : Unknown, Use with caution!
# HISTORY          : 
# Description      : 
# If there is a symbols file preent, get the most recent version a
# symbol was added in.
# 


# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# 

# Make sure we abort on error
set -e
progname="$(basename \"$0\")"

test ! -d debian || \
  find debian -wholename 'debian/*\.symbols' | while read lib; do
    echo -n "Shlib info for" ${lib%%.symbols} ": ";
    sort -n -k 2,2b $lib  | grep '^ ' | tail -n 1 | awk '{print $2;}';
done

