aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/find_lib.sh
blob: f6419bb85da2ab94bdc10724b8b7ee1bd388c17a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
:
re=$1; shift

# some Linux systems have deprecated egrep in favor of grep -E
# but not everyone supports that
case "`echo bmake | egrep 'a|b' 2>&1`" in
bmake) ;;
*) egrep() { grep -E "$@"; }
esac

for lib in $*
do
  found=`nm $lib | egrep "$re"`
  case "$found" in
  "") ;;
  *)	echo "$lib: $found";;
  esac
done