Last active
December 16, 2015 19:29
-
-
Save KacperKozak/5485361 to your computer and use it in GitHub Desktop.
This file contains 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 | |
if [ -e $1 ] | |
then | |
echo "Podaj rozmiar jako pierwszy argument" | |
else | |
if [ -e $2 ] | |
then | |
for file in $* | |
do | |
if [ $file != $1 ] | |
then | |
echo "Croping $file to $1" | |
mogrify -resize $1^ "$file" | |
mogrify -gravity Center -crop $1+0+0 "$file" | |
echo "OK!" | |
fi | |
done | |
else | |
echo "Gdzie się podziały pliki?!" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment