From d6d416b653c339043ac3ee429b526af481521564 Mon Sep 17 00:00:00 2001 From: Jakub Klinkovský Date: Mon, 17 Jun 2024 21:03:33 +0200 Subject: feat(checkpkg): enhance diff command for comparing file lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace `sdiff` with `diff` (also from `diffutils`) with the following parameters: - `--side-by-side` for the `sdiff`-like output - `--suppress-common-lines` for the `sdiff -s` behavior - `--width="$COLUMNS"` to use the full terminal width (long lines are still truncated but it is definitely better than the default width of 130 chars) - `--color=auto` just because 😉 --- src/checkpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/checkpkg.in b/src/checkpkg.in index ccb7259..6ee18c6 100644 --- a/src/checkpkg.in +++ b/src/checkpkg.in @@ -140,7 +140,7 @@ for _pkgname in "${pkgname[@]}"; do bsdtar tf "$TEMPDIR/$oldpkg" | sort > "$TEMPDIR/filelist-$_pkgname-old" bsdtar tf "$pkgfile" | sort > "$TEMPDIR/filelist-$_pkgname" - sdiff -s "$TEMPDIR/filelist-$_pkgname-old" "$TEMPDIR/filelist-$_pkgname" + diff --side-by-side --suppress-common-lines --width="$COLUMNS" --color=auto "$TEMPDIR/filelist-$_pkgname-old" "$TEMPDIR/filelist-$_pkgname" find-libprovides "$TEMPDIR/$oldpkg" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname-old" find-libprovides "$pkgfile" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname" -- cgit v1.2.3-70-g09d2