Created
May 30, 2016 12:06
-
-
Save ikuwow/ae3d923b92c6027afa10a3f8188492c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORKDIR=~/Desktop/untitled | |
OUTPUTDIR=~/Desktop/pdfed | |
[[ ! -d $OUTPUTDIR ]] && mkdir $OUTPUTDIR | |
echo $WORKDIR | |
for FOLDER in $WORKDIR/*; do | |
[[ ! -d "$FOLDER" ]] && continue | |
NAME=`basename "$FOLDER"` | |
echo $NAME | |
convert -limit memory 2GiB "$FOLDER/*.{jpg,jpeg,png}" "$OUTPUTDIR/$NAME.pdf" | |
[[ ! $0 > 0 ]] && trash "$FOLDER" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment