kiss: fix shellcheck

This commit is contained in:
Dylan Araps 2020-09-14 22:32:58 +03:00
parent 8261c230fc
commit d85028e0f1
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

18
kiss
View File

@ -692,18 +692,18 @@ pkg_checksums() {
done < "$repo_dir/sources" || die "$1" "Failed to generate checksums" done < "$repo_dir/sources" || die "$1" "Failed to generate checksums"
} }
pkg_checksums_save() { pkg_checksum_save() {
# Generate and save checksums to file. # Generate and save checksums to file.
pkg_find "$pkg" pkg_find "$1"
[ -f "$repo_dir/sources" ] || [ -f "$repo_dir/sources" ] ||
continue return 0
sums=$(pkg_checksums "$pkg") sums=$(pkg_checksums "$1")
[ "$sums" ] || { [ "$sums" ] || {
log "$pkg" "Nothing to do" log "$1" "Nothing to do"
continue return 0
} }
# False positive ('>> file' with no command). # False positive ('>> file' with no command).
@ -714,12 +714,12 @@ pkg_checksums_save() {
tee "$repo_dir/checksums" tee "$repo_dir/checksums"
else else
log "$pkg" "Need permissions to generate checksums" log "$1" "Need permissions to generate checksums"
file_owner "$repo_dir" file_owner "$repo_dir"
as_root tee "$repo_dir/checksums" as_root tee "$repo_dir/checksums"
fi fi
log "$pkg" "Generated checksums" log "$1" "Generated checksums"
} }
pkg_verify() { pkg_verify() {
@ -1366,7 +1366,7 @@ args() {
done done
for pkg do for pkg do
pkg_checksums_save "$pkg" pkg_checksum_save "$pkg"
done done
;; ;;