Conversion formats

This commit is contained in:
Bob Mottram 2016-03-23 16:01:37 +00:00
parent a16c4f843b
commit a758f2ff03
1 changed files with 8 additions and 5 deletions

View File

@ -123,15 +123,18 @@ function set_avatar_from_url {
# convert to png
wget $AVATAR -O avatar
if [[ $AVATAR == *".gif" ]]; then
mogrify -format png avatar
mv avatar avatar.gif
mogrify -format png avatar.gif
fi
if [[ $AVATAR == *".jpg" ]]; then
mogrify -format png avatar
mv avatar avatar.jpg
mogrify -format png avatar.jpg
fi
if [[ $AVATAR == *".jpeg" ]]; then
mogrify -format png avatar
mv avatar avatar.jpeg
mogrify -format png avatar.jpeg
fi
if [[ $AVATAR != *".png" ]]; then
if [ -f avatar ]; then
mv avatar avatar.png
fi