diff options
author | Christian Franke <nobody@nowhere.ws> | 2013-05-05 13:59:33 +0200 |
---|---|---|
committer | Christian Franke <nobody@nowhere.ws> | 2013-05-05 13:59:33 +0200 |
commit | 818e032c10409675ff073d38039c1ae7d75148c3 (patch) | |
tree | eca057f671db0cb42a8766b38c8f3534f24f0067 /scripts | |
parent | a291be331ee46ef31a6e0233cf5ee75eb2d90873 (diff) |
fix some zshisms
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/trollette.sh | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/scripts/trollette.sh b/scripts/trollette.sh index c3d6a21..60cbe4c 100755 --- a/scripts/trollette.sh +++ b/scripts/trollette.sh @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/bin/sh WEBPATH="../" NAME="klo" @@ -15,15 +15,20 @@ cp ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg ${WEBPATH}/public/img/buffer. mogrify +noise Gaussian -attenuate 0.4 -adaptive-sharpen 3 -resize 208x117 ${WEBPATH}/public/img/buffer.thumb.${NAME}.webcam.jpg -if [ x"${TIMESTAMP}" == x"yes" ]; then +if [ x"${TIMESTAMP}" = x"yes" ]; then if [ $TIME -lt 6 ] || [ $TIME -ge 18 ]; then - mogrify +noise Gaussian -attenuate 0.4 -adaptive-sharpen 3 -fill white -gravity SouthEast -draw "text 10,10 '${TODAY}'" ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg - else - mogrify -contrast-stretch 0 -adaptive-sharpen 3 -fill black -gravity SouthEast -draw "text 10,10 '${TODAY}'" ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg - fi - fi - - mv -f ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg ${WEBPATH}/public/img/${NAME}.webcam.jpg &> /dev/null - mv -f ${WEBPATH}/public/img/buffer.thumb.${NAME}.webcam.jpg ${WEBPATH}/public/img/thumb.${NAME}.webcam.jpg &> /dev/null - exit 0 + mogrify +noise Gaussian -attenuate 0.4 -adaptive-sharpen 3 \ + -fill white -gravity SouthEast \ + -draw "text 10,10 '${TODAY}'" \ + ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg + else + mogrify -contrast-stretch 0 -adaptive-sharpen 3 \ + -fill black -gravity SouthEast \ + -draw "text 10,10 '${TODAY}'" \ + ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg + fi +fi + +mv -f ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg ${WEBPATH}/public/img/${NAME}.webcam.jpg &> /dev/null +mv -f ${WEBPATH}/public/img/buffer.thumb.${NAME}.webcam.jpg ${WEBPATH}/public/img/thumb.${NAME}.webcam.jpg &> /dev/null |