From 591603fcdb0660ec6689019e39437c2d9e513229 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 14 Jan 2019 15:18:32 +0800 Subject: cli/jpg2pdf.sh: Add simple usage --- cli/jpg2pdf.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/jpg2pdf.sh b/cli/jpg2pdf.sh index ac992af..9041009 100755 --- a/cli/jpg2pdf.sh +++ b/cli/jpg2pdf.sh @@ -1,7 +1,7 @@ #!/bin/sh # ############################################################################# -# +# # Shellscript to convert a set of JPEG files to a multipage PDF. # # Requirements: (1) Ghostscript needs to be installed on the local system. @@ -18,6 +18,12 @@ # ############################################################################# +if [ $# -lt 2 ]; then + echo "Usage:" + echo " `basename $0` output.pdf 1.jpg ..." + exit 1 +fi + outfile=$1 shift -- cgit v1.2.2