kiss: add back prevention of empty depends files

This commit is contained in:
Dylan Araps 2021-07-05 13:10:05 +03:00
parent 3d431fe22c
commit f9bf8816f2
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

6
kiss
View File

@ -571,11 +571,13 @@ EOF
done | sort -uk1,1 depends - > "$tmp_dir/.fixdeps" done | sort -uk1,1 depends - > "$tmp_dir/.fixdeps"
# If the depends file was modified, show a diff and replace it. # If the depends file was modified, show a diff and replace it.
! [ -s "$tmp_dir/.fixdeps" ] || { if [ -s "$tmp_dir/.fixdeps" ]; then
diff -U 3 depends - < "$tmp_dir/.fixdeps" 2>/dev/null || : diff -U 3 depends - < "$tmp_dir/.fixdeps" 2>/dev/null || :
mv -f "$tmp_dir/.fixdeps" depends mv -f "$tmp_dir/.fixdeps" depends
pkg_manifest "${PWD##*/}" pkg_manifest "${PWD##*/}"
} else
rm -f depends
fi
} }
pkg_manifest() ( pkg_manifest() (