freebsd-src/contrib/bmake/find_lib.sh
2023-01-27 16:33:01 -08:00

21 lines
321 B
Bash
Executable File

:
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