From a6acfedfc6058943eed3f878afaabda69b7b4e4a Mon Sep 17 00:00:00 2001 From: gorgone Date: Wed, 6 Feb 2019 21:13:53 +0100 Subject: [PATCH] fix menu patching --- support/functions/_patch | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/support/functions/_patch b/support/functions/_patch index 841f0ee..27596f5 100644 --- a/support/functions/_patch +++ b/support/functions/_patch @@ -14,12 +14,9 @@ _get_patch(){ [ -f $PATCHNAME ] && echo -e $G" ok$W new $PATCHNAME loadet\n" || echo -e $R" patch not found\n"$W; }; _apply_menupatch(){ - cd "$pdir"; - pf=(*); - if [ ${#pf[@]} -gt 1 ];then - [ -f "$workdir/SVN-IS-PATCHED" ] && quicksvnrestore $_toolchainname 2>/dev/null; - if [ ! -f "$workdir/SVN-IS-PATCHED" ];then - (if [ "$(ls -A "$pdir"/*.patch 2>/dev/null)" ];then + [ -f "$workdir/SVN-IS-PATCHED" ] && quicksvnrestore $_toolchainname 2>/dev/null; + cd "$pdir"; + (if [ "$(ls -1 "$pdir"/*.patch 2>/dev/null | wc -l)" -gt "0" ];then cd "$pdir"; unset patchlist;patchlist=`ls *.patch | sort -st '/' -k1,1`; for e in ${patchlist[@]};do @@ -56,8 +53,6 @@ _apply_menupatch(){ esac; rm -rf "$patchlog"; fi;)|"$gui" "$st_" "$bt_" "$title_" "$pb_" 12 62;sleep 2; - fi; - fi; }; _apply_consolepatch(){ if [ ! -f "$workdir/SVN-IS-PATCHED" ];then