Skip to content

Commit

Permalink
valabind-cc: Support BSD sed (#38)
Browse files Browse the repository at this point in the history
The BSD version of sed uses a different flag to enable extended regular
expressions (-E) compared to GNU sed.
  • Loading branch information
dholm authored and radare committed Feb 9, 2017
1 parent f23ff94 commit 03762a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion valabind-cc
Expand Up @@ -226,7 +226,11 @@ while : ; do
elif [ "`echo $1 | grep -- '^-D'`" ]; then
VALABINDFLAGS="`echo $1|sed -e 's,^-D,-D ,'` ${VALABINDFLAGS}"
elif [ "`echo $1 | grep -- '^--nolibpython'`" ]; then
LDFLAGS="$(echo ${LDFLAGS} | sed -r 's,-lpython[0-9.]+,,g')"
SEDFLAGS="-r"
if [ -z "`sed --version 2>/dev/null | grep GNU`" ]; then
SEDFLAGS="-E"
fi
LDFLAGS="$(echo ${LDFLAGS} | sed ${SEDFLAGS} 's,-lpython[0-9.]+,,g')"
else
FILES="$1 ${FILES}"
fi
Expand Down

0 comments on commit 03762a0

Please sign in to comment.