Fix: Proper targets.

This commit is contained in:
Dmitry Voronin 2025-01-13 12:06:11 +03:00
parent e393b42177
commit 794ab3d154
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -20,6 +20,15 @@ function fix_gradle_lock() {
}
# Fix pdfs when they don't want to be uploaded to Paperless.
# Usage: fix_pdf [FILES]
function fix_pdf() {
qpdf --replace-input "${@}"
local IFS=$'\n'
local targets=(${@})
[[ ${targets} == "" ]] && targets=("*.pdf")
process() {
qpdf --replace-input "${target}"
}
_iterate_targets process ${targets[@]}
}