From d80ca4a6ee7f32a1efb53e55d91c0c8c0a940fc8 Mon Sep 17 00:00:00 2001 From: Stefan Schlott Date: Fri, 26 Aug 2022 19:40:50 +0200 Subject: [PATCH] Use installed t if available --- scripts/send-reminder-tweets.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/send-reminder-tweets.sh b/scripts/send-reminder-tweets.sh index 5f002c30..b42a520e 100755 --- a/scripts/send-reminder-tweets.sh +++ b/scripts/send-reminder-tweets.sh @@ -1,18 +1,23 @@ #!/bin/bash WEBSITE_DIR=${WEBSITE_DIR:-output} +if [[ -f "/usr/local/bundle/bin/t" ]] ; then + T=/usr/local/bundle/bin/t +else + T="bundle exec t" +fi TOOT=${TOOT:-/usr/local/bin/toot} cd `dirname $0`/.. cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 0 "Heute:" | while read LINE ; do - bundle exec t update "$LINE" + $T update "$LINE" done cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 1 "Morgen:" | while read LINE ; do - bundle exec t update "$LINE" + $T update "$LINE" done cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 7 "In einer Woche:" | while read LINE ; do - bundle exec t update "$LINE" + $T update "$LINE" done cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 0 "Heute:" 500 | while read LINE ; do