all repos — fluxbox @ 6c284b9c7cb0d711981c2e0ee6fe42ec98c9223c

custom fork of the fluxbox windowmanager

fbgm used non-portable grep - option (-m) which is now replaced by
grep | head -n 1
mathias mathias
commit

6c284b9c7cb0d711981c2e0ee6fe42ec98c9223c

parent

019da77c56f951793dfdcb4f04a2fe827f26a835

2 files changed, 9 insertions(+), 6 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.14: *05/06/18: + * Fixes #1206821, unportable usage of grep in fbgm (thanx Dung) + util/fluxbox-generate_menu.in * Fixes #1116965, shadwd windows on restart (Mathias) Window.cc * little Fix for font effects (Mathias)
M util/fluxbox-generate_menu.inutil/fluxbox-generate_menu.in

@@ -38,6 +38,7 @@ # - don't use ~, use ${HOME}

# - don't use id -u or $UID, use whoami # - getopts won't work on all platforms, but the config-file can # compensate for that. +# - OpenBSD and Solaris grep do not have the -m option # - various software like grep/sed/perl may be not present or not # the version you have. for example grep '\W' only works on gnu-grep. # Keep this in mind, use bare basic defaults.

@@ -271,7 +272,7 @@ temp_icon="$2"

# $dnlamVERBOSE "# Searching for icon $temp_icon for $execname" >> $ICONMAPPING # check in $ICONMAPPING before searching directories - entry_icon=`grep -m 1 "^\"${execname}\"" $ICONMAPPING | grep -o '<.*>'` + entry_icon=`grep "^\"${execname}\"" $ICONMAPPING | head -n 1 | grep -o '<.*>'` if [ -n "$entry_icon" ]; then entry_icon=`replaceWithinString "$entry_icon" "<"` entry_icon=`replaceWithinString "$entry_icon" ">"`

@@ -365,16 +366,16 @@ # $dnlamVERBOSE echo "# ------- Looking in $DIR" >&2

# >> $ICONMAPPING find "$DIR" -type f -name "*.desktop" | while read DESKTOP_FILE; do # echo $DESKTOP_FILE; - #entry_name=`grep -m 1 '^[ ]*Name=' $DESKTOP_FILE` + #entry_name=`grep '^[ ]*Name=' $DESKTOP_FILE | head -n 1` #entry_name=${entry_name##*=} - entry_exec=`grep -m 1 '^[ ]*Exec=' "$DESKTOP_FILE"` + entry_exec=`grep '^[ ]*Exec=' "$DESKTOP_FILE" | head -n 1` entry_exec=${entry_exec##*=} entry_exec=`replaceWithinString "$entry_exec" "\""` if [ -z "$entry_exec" ]; then entry_exec=${DESKTOP_FILE%%.desktop*} fi - entry_icon=`grep -m 1 '^[ ]*Icon=' "$DESKTOP_FILE"` + entry_icon=`grep '^[ ]*Icon=' "$DESKTOP_FILE" | head -n 1` entry_icon=${entry_icon##*=} # $dnlamVERBOSE echo "--- $entry_exec $entry_icon" >&2

@@ -407,11 +408,11 @@ [ -z "$execname" ] && { echo "execname is NULL; cannot lookup"; return 1; }

execname=`removePath "$execname"` #echo "grepping ${execname}" - iconString=`grep -m 1 "^\"${execname}\"" $ICONMAPPING | grep -o '<.*>'` + iconString=`grep "^\"${execname}\"" $ICONMAPPING | head -n 1 | grep -o '<.*>'` # $dnlamVERBOSE "lookupIcon $execname, $iconString" >&2 if [ -z "$iconString" ] ; then - iconString=`grep -m 1 "^\"${execname%% *}" $ICONMAPPING | grep -o '<.*>'` + iconString=`grep "^\"${execname%% *}" $ICONMAPPING | head -n 1 | grep -o '<.*>'` fi if [ -z "$iconString" ] && [ -z "$PARSING_DESKTOP" ] ; then