From ccb8d28af48fff8317d254a70b2800dabb90cfbe Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 27 Aug 2016 13:12:15 +0200 Subject: nur noch nächstes Paket ausgeben MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compare-my-ports-to-others | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/compare-my-ports-to-others b/compare-my-ports-to-others index cab06b1..6dc2df6 100755 --- a/compare-my-ports-to-others +++ b/compare-my-ports-to-others @@ -14,6 +14,8 @@ do grep -q ']' \ ) - [ ${numLinesDiff} -ge 10 ] && echo "${pkg}: ${numLinesDiff}" && continue - echo "${pkg} gibt es noch mal so ähnlich: ${pkgfile}" - diff -u3 \ - <( \ - echo "${remPkgCont}" | \ - grep -v '^#' | \ - sed 's|^\s\+| |' \ - ) \ - <( \ - curl "https://crux.eckner.net/${pkg}/Pkgfile" 2> /dev/null | \ - grep -v '^#' | \ - sed 's|^\s\+| |' \ - ) + [ ${minNum} -ge 0 ] && [ ${minNum} -le ${numLinesDiff} ] && continue + minNum=${numLinesDiff} + [ ${numLinesDiff} -ge 10 ] && minPrint="${pkg}: ${numLinesDiff}" && continue + minPrint="$( + echo "${pkg} gibt es noch mal so ähnlich: ${pkgfile}" + diff -u3 \ + <( \ + echo "${remPkgCont}" | \ + grep -v '^#' | \ + sed 's|^\s\+| |' \ + ) \ + <( \ + curl "https://crux.eckner.net/${pkg}/Pkgfile" 2> /dev/null | \ + grep -v '^#' | \ + sed 's|^\s\+| |' \ + ) + )" done + [ ${minNum} -ge 0 ] && echo "${minPrint}" done -- cgit v1.2.3-54-g00ecf