From b39381f4f90cc010e480155fb0823c85492096f0 Mon Sep 17 00:00:00 2001 From: Ben Taylor Date: Tue, 1 May 2007 02:23:29 +0000 Subject: [PATCH] wineshelllink: Improve /bin/sh and awk compatibility. --- tools/wineshelllink | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/wineshelllink b/tools/wineshelllink index b4d76d890b7..3cfea2897e6 100755 --- a/tools/wineshelllink +++ b/tools/wineshelllink @@ -141,7 +141,8 @@ get_menu_entries() awk ' BEGIN { RS="<" } /^Filename/ { - if (match($0,/>/)) { + RSTART=index($0,">") + if (RSTART>0) { print substr($0,RSTART+1) } }' $tmp @@ -182,7 +183,8 @@ write_menu_file() IFS=" " - for i in $(get_menu_entries "$menu"); do + for i in `get_menu_entries "$menu"` + do test "$i" = "$filename" && continue echo " $i" done -- 2.11.4.GIT