summaryrefslogtreecommitdiffstats
path: root/shrink_pdf
diff options
context:
space:
mode:
Diffstat (limited to 'shrink_pdf')
-rwxr-xr-xshrink_pdf8
1 files changed, 7 insertions, 1 deletions
diff --git a/shrink_pdf b/shrink_pdf
index 66347c3..9f06e30 100755
--- a/shrink_pdf
+++ b/shrink_pdf
@@ -1,3 +1,9 @@
#!/bin/env bash
+filename="${1}"
-ps2pdf -dPDFSETTINGS=/ebook "${1}" "small_${1}"
+if [ -z "${filename}" ]; then
+ echo please provide a file name
+ exit 1
+fi
+
+ps2pdf -dPDFSETTINGS=/ebook "${filename}" "small_${filename}"