From 818e032c10409675ff073d38039c1ae7d75148c3 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sun, 5 May 2013 13:59:33 +0200 Subject: fix some zshisms --- scripts/trollette.sh | 27 ++++++++++++++++----------- 1 file 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 -- cgit v1.2.1