Missing reminder script in container

This commit is contained in:
Stefan Schlott 2022-08-26 20:47:06 +02:00
parent d80ca4a6ee
commit ab2c355452
2 changed files with 13 additions and 7 deletions

View file

@ -6,27 +6,32 @@ if [[ -f "/usr/local/bundle/bin/t" ]] ; then
else
T="bundle exec t"
fi
if [[ -f "/usr/local/bin/tweet-reminders.rb" ]] ; then
REMINDERS=/usr/local/bin/tweet-reminders.rb
else
REMINDERS=scripts/tweet-reminders.rb
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
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 0 "Heute:" | while read LINE ; do
$T update "$LINE"
done
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 1 "Morgen:" | while read LINE ; do
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 1 "Morgen:" | while read LINE ; do
$T update "$LINE"
done
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 7 "In einer Woche:" | while read LINE ; do
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 7 "In einer Woche:" | while read LINE ; do
$T update "$LINE"
done
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 0 "Heute:" 500 | while read LINE ; do
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 0 "Heute:" 500 | while read LINE ; do
$TOOT "$LINE"
done
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 1 "Morgen:" 500 | while read LINE ; do
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 1 "Morgen:" 500 | while read LINE ; do
$TOOT "$LINE"
done
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 7 "In einer Woche:" 500 | while read LINE ; do
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 7 "In einer Woche:" 500 | while read LINE ; do
$TOOT "$LINE"
done