pkgsrc/wm/fluxbox/patches/patch-aa
tonio c28760869c Take care of nonportable use of grep in fluxbox-generate-menu
This should fix the build under openbsd and solaris
2005-10-20 15:55:01 +00:00

22 lines
1.1 KiB
Text

$NetBSD: patch-aa,v 1.8 2005/10/20 15:55:01 tonio Exp $
--- util/fluxbox-generate_menu.in.orig 2005-08-25 18:52:50.000000000 +0200
+++ util/fluxbox-generate_menu.in
@@ -51,7 +51,7 @@ WHOAMI=`whoami`
[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
# Check for Imlib2-support
-if fluxbox -info 2> /dev/null | grep -q "^IMLIB"; then
+if fluxbox -info 2> /dev/null | grep "^IMLIB" > /dev/null; then
PNG_ICONS="yes"
else
# better assume to assume "no"
@@ -343,7 +343,7 @@ searchForIcon(){
# echo "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>"
if [ -f "$entry_icon" ]; then
# if icon exists and entry does not already exists, add it
- if ! grep -q -m 1 "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING 2> /dev/null; then
+ if ! grep "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING > /dev/null; then
echo -e "\"${entry_exec}\" \t <${entry_icon}>" >> $ICONMAPPING
else
: echo "# mapping already exists for ${entry_exec}" >> $ICONMAPPING