Created
October 15, 2017 18:43
-
-
Save rringler/2832af3612f1b8ee7eada5b7023c374e 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
path=$(dirname "$1") | |
basename="animated" | |
filename="animated.gif" | |
counter="0" | |
while [ -e "$path/$filename" ]; do | |
((counter++)) | |
filename="$basename ($counter).gif" | |
done | |
/usr/local/bin/convert -delay 20 -loop 0 -resize 50% "$@" "$path/$filename" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment