Created
May 14, 2019 11:44
-
-
Save zeha/21237b607902e7e320650bd08cc1a012 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "--cflags" ]; then | |
FLAGS=$(/usr/bin/net-snmp-config --cflags) | |
MYFLAGS="" | |
for flag in $FLAGS; do | |
if [[ "$flag" =~ -DNETSNMP* ]]; then | |
MYFLAGS="$MYFLAGS $flag" | |
fi | |
done | |
echo "$MYFLAGS" | |
exit 0 | |
elif [ "$1" = "--agent-libs" ]; then | |
FLAGS=$(/usr/bin/net-snmp-config --agent-libs) | |
MYFLAGS="" | |
for flag in $FLAGS; do | |
if [[ "$flag" =~ -lnetsnmp* ]]; then | |
MYFLAGS="$MYFLAGS $flag" | |
fi | |
done | |
echo "$MYFLAGS" | |
exit 0 | |
elif [ "$1" = "--netsnmp-agent-libs" ]; then | |
exec /usr/bin/net-snmp-config "$1" | |
else | |
echo "E: debian/configure-helpers/net-snmp-config: unknown flag $1" >&2 | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment