diff options
author | Erich Eckner <git@eckner.net> | 2016-08-27 13:12:15 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-08-27 13:12:15 +0200 |
commit | ccb8d28af48fff8317d254a70b2800dabb90cfbe (patch) | |
tree | f0e168724ee8d43af6ad933a855ba6287a4d0ea9 | |
parent | 85beba21d0dff77309fa4f09be17b4274cf88904 (diff) | |
download | crux-enhancements-master.tar.xz |
-rwxr-xr-x | compare-my-ports-to-others | 33 |
1 files 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 '<td><a href="?a=repo&q=' \ || continue + minNum=-1 + minPrint='' for pkgfile in $( \ echo "${inhalt}" | \ tr '\n' ' ' | \ @@ -42,19 +44,24 @@ do ) | \ grep -c '^[<>]' \ ) - [ ${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 |