From fdbe2fdb88b20bf3461e479d65b3ae10604dffca Mon Sep 17 00:00:00 2001 From: Dan Church Date: Mon, 31 Oct 2022 16:11:54 -0500 Subject: [PATCH] Exit with error if no files are specified --- optipdf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/optipdf b/optipdf index 3aaa51c..d61785b 100755 --- a/optipdf +++ b/optipdf @@ -104,6 +104,11 @@ for ARG; do fi done +if [[ ${#FILES[@]} -eq 0 ]]; then + USAGE >&2 + exit 1 +fi + file_size() { stat \ --format='%s' \