From a758f2ff032af3bc92d488dc09466672a1b6ce58 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 23 Mar 2016 16:01:37 +0000 Subject: [PATCH] Conversion formats --- src/freedombone-blog | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/freedombone-blog b/src/freedombone-blog index 9f5aaba2..0e337083 100755 --- a/src/freedombone-blog +++ b/src/freedombone-blog @@ -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 - fi - if [[ $AVATAR != *".png" ]]; then + mv avatar avatar.jpeg + mogrify -format png avatar.jpeg + fi + if [ -f avatar ]; then mv avatar avatar.png fi