diff options
author | B. Watson <yalhcru@gmail.com> | 2018-08-26 03:29:48 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2018-08-26 03:29:48 -0400 |
commit | 5dde16db1463aa520d256ad34e1f7e3feb0b3211 (patch) | |
tree | 9d0ce072de27f58c28df152fe9ef482ab5ac0520 /slack_last_update.sh | |
parent | 49962557a26a194f9169623fc9ae51eb46037cc0 (diff) | |
download | misc-scripts-5dde16db1463aa520d256ad34e1f7e3feb0b3211.tar.gz |
slacktopic.pl: rewrite, add paranoia, no more external script
Diffstat (limited to 'slack_last_update.sh')
-rwxr-xr-x | slack_last_update.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/slack_last_update.sh b/slack_last_update.sh index 696bed5..1f04cb6 100755 --- a/slack_last_update.sh +++ b/slack_last_update.sh @@ -15,21 +15,26 @@ # it depends on what the error actually was. # This script can be tested from the command line, but in production it -# will be executed from an irssi script, which will use the exit status -# to decide whether the channel /topic should be updated. +# will be executed from an irssi script, so it's got no need for options +# or verbose output. Actually, the irssi script currently doesn't even +# look at the exit status (other than to check for an error), so even +# that could be removed to simplify things. # For the morbidly curious: I intend this to be executed by bash, # but it also works with Slackware 14.2's ash and ksh, and dash from -# SBo. But *not* zsh: somehow $RANGE gets expanded to a quoted string, +# SBo. But *not* zsh: $RANGE gets expanded to a quoted string, # so curl gets executed as: # curl --silent '--range 0-28' http://... # and quite properly complains: # curl: option --range 0-28: is unknown -# I'm not a zsh guy, if you are & have a fix, let me know. +# I'm not a zsh guy, but I did some research... either have to use the +# syntax $=range (zsh-specific) or check for ZSH_* in the environment +# and do 'setopt shwordsplit'. Pretty sure this means I shall never +# again care whether one of my shell scripts fails on zsh. ### Config stuff. -# Where the date get stored +# Where the date gets stored. DATEFILE="$HOME/.slack_last_update" # Use the primary site, not a mirror. |