kiss: Remove depends file if empty

This commit is contained in:
Dylan Araps 2020-03-09 00:14:06 +02:00
parent 2ba1a2a0c5
commit 3b4e8083e8
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 4 additions and 1 deletions

5
kiss
View File

@ -448,6 +448,9 @@ pkg_fixdeps() {
# Display a diff of the new dependencies against the old ones.
diff "$dep_file" depends 2>/dev/null ||:
# Remove the depends file if it is empty.
[ -s depends ] || rm -f depends
}
pkg_manifest() (
@ -1310,7 +1313,7 @@ args() {
l|list) pkg_list "$@" ;;
u|update) pkg_updates ;;
s|search) for pkg; do pkg_find "$pkg" all; done ;;
v|version) log kiss 1.7.6 ;;
v|version) log kiss 1.7.7 ;;
h|help|-h|--help|'')
log 'kiss [a|b|c|i|l|r|s|u|v] [pkg] [pkg] [pkg]'