Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # convertpdf
- # convert image(s) to .pdf
- if [[ -z $1 || $1 == '-h' ]] ; then
- echo "usage : convert /workdir (name)"
- echo "or use this dir : "
- pwd
- fi
- if [[ $1 && ! $1 == '-h' ]] ; then
- cd "$1"
- else
- cd "${PWD}"
- fi
- if [[ $2 ]] ; then
- name="$2"
- else
- name="${PWD##*/}"
- fi
- echo "run ..."
- convert -verbose -compress JPEG -quality 90 "./*" "$name".pdf ## ./ prevent names like "- "
- ls
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement