cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 3a5485f36c63d732468156d8020b9fb2c3c5799b
parent 2063c19389670f297e39e7fa185f3876d0736a54
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Sat, 29 Feb 2020 20:07:34 +0200

kiss: Remove -N from diff

Diffstat:
Mkiss | 16++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/kiss b/kiss @@ -397,7 +397,12 @@ pkg_fixdeps() { # Make a copy of the depends file if it exists to have a # reference to 'diff' against. - [ -f depends ] && cp -f depends "$mak_dir/d" + if [ -f depends ]; then + cp -f depends "$mak_dir/d" + dep_file=$mak_dir/d + else + dep_file=/dev/null + fi # Generate a list of all installed manifests. pkg_name=$1 @@ -434,16 +439,15 @@ pkg_fixdeps() { *) printf '%s\n' "$dep" ;; esac done ||: - done | + done >> depends # Remove duplicate entries from the new depends file. # This removes duplicate lines looking *only* at the # first column. - sort -uk1,1 -o depends depends - 2>/dev/null ||: + sort -uk1,1 -o depends depends 2>/dev/null ||: - # Display a 'diff' of the new dependencies against - # the old ones. '-N' treats non-existent files as blank. - diff -N "$mak_dir/d" depends ||: + # Display a diff of the new dependencies against the old ones. + diff "$dep_file" depends 2>/dev/null ||: } pkg_manifest() (