Fixup commit, previous did not include merge

This commit is contained in:
Micah Anderson 2017-11-15 13:14:41 -05:00
parent 57190c20f3
commit f3aa50f350
No known key found for this signature in database
GPG Key ID: 8CBF9A322861A790

View File

@ -219,51 +219,51 @@ function isnow() {
whentime=`echo "$whentime" | @SED@ 's/:[0-9][0-9]$//' | @SED@ -r 's/^([0-9])$/0\1/'` whentime=`echo "$whentime" | @SED@ 's/:[0-9][0-9]$//' | @SED@ -r 's/^([0-9])$/0\1/'`
if [ "$whendayofweek" == "everyday" -o "$whendayofweek" == "daily" ]; then if [ "$whendayofweek" == "everyday" -o "$whendayofweek" == "daily" ]; then
whendayofweek=$nowdayofweek whendayofweek=$nowdayofweek
fi fi
if [ "$whenday" == "" ]; then if [ "$whenday" == "" ]; then
if [ "$whendayofweek" != "$nowdayofweek" ]; then if [ "$whendayofweek" != "$nowdayofweek" ]; then
whendayofweek=${whendayofweek%s} whendayofweek=${whendayofweek%s}
if [ "$whendayofweek" != "$nowdayofweek" ]; then if [ "$whendayofweek" != "$nowdayofweek" ]; then
if [ "$whendayofweek" != "mondays" -a "$whendayofweek" != "tuesdays" -a "$whendayofweek" != "wednesdays" -a "$whendayofweek" != "thursdays" -a "$whendayofweek" != "fridays" -a "$whendayofweek" != "saturdays" -a "$whendayofweek" != "sundays" ]; then if [ "$whendayofweek" != "mondays" -a "$whendayofweek" != "tuesdays" -a "$whendayofweek" != "wednesdays" -a "$whendayofweek" != "thursdays" -a "$whendayofweek" != "fridays" -a "$whendayofweek" != "saturdays" -a "$whendayofweek" != "sundays" ]; then
warning "The day in the 'when' option in the configuration is malformed. Please read the README for examples." warning "The day in the 'when' option in the configuration is malformed. Please read the README for examples."
fi fi
if [ "$at" != "at" ]; then if [ "$at" != "at" ]; then
warning "The 'when' option in the configuration doesn't contain an 'at'. Please read the README for examples." warning "The 'when' option in the configuration doesn't contain an 'at'. Please read the README for examples."
fi fi
if [[ "$whentimeoriginal" != @([0-9][0-9])?(:[0-9][0-9]) ]]; then if [[ "$whentimeoriginal" != @([0-9][0-9])?(:[0-9][0-9]) ]]; then
warning "The time in the 'when' option in the configuration is malformed or does not exist. Please read the README for examples." warning "The time in the 'when' option in the configuration is malformed or does not exist. Please read the README for examples."
fi fi
return 0 return 0
fi fi
fi fi
elif [ "$whenday" != "$nowday" ]; then elif [ "$whenday" != "$nowday" ]; then
if [ "$whenday" -lt 1 -o "$whenday" -gt 31 ]; then if [ "$whenday" -lt 1 -o "$whenday" -gt 31 ]; then
warning "The numeric value of the day in the 'when' option in the configuration does not match a day. Please read the README for examples." warning "The numeric value of the day in the 'when' option in the configuration does not match a day. Please read the README for examples."
fi fi
if [ -z "$whentime" ]; then if [ -z "$whentime" ]; then
warning "The 'when' variable in the configuration file is malformed. You either didn't specify the day or the time. Please read the README for eamples." warning "The 'when' variable in the configuration file is malformed. You either didn't specify the day or the time. Please read the README for eamples."
fi fi
if [ "$at" != "at" ]; then if [ "$at" != "at" ]; then
warning "The 'when' option in the configuration doesn't contain an 'at'. Please read the README for examples." warning "The 'when' option in the configuration doesn't contain an 'at'. Please read the README for examples."
fi fi
return 0 return 0
elif [ -z "$whentime" ]; then elif [ -z "$whentime" ]; then
warning "The 'when' variable in the configuration file is malformed. You either didn't specify the day or the time. Please read the README for examples." warning "The 'when' variable in the configuration file is malformed. You either didn't specify the day or the time. Please read the README for examples."
return 0 return 0
fi fi
if [ "$at" != "at" ]; then if [ "$at" != "at" ]; then
warning "The 'when' option in the configuration doesn't contain an 'at'. Please read the README for examples." warning "The 'when' option in the configuration doesn't contain an 'at'. Please read the README for examples."
return 0 return 0
fi fi
if [[ "$whentimeoriginal" != @([0-9][0-9])?(:[0-9][0-9]) ]]; then if [[ "$whentimeoriginal" != @([0-9][0-9])?(:[0-9][0-9]) ]]; then
warning "The time in the 'when' option in the configuration is malformed. Please read the README for examples." warning "The time in the 'when' option in the configuration is malformed. Please read the README for examples."
return 0 return 0
elif [ "$whentime" != "$nowtime" ]; then elif [ "$whentime" != "$nowtime" ]; then
return 0 return 0
fi fi
return 1 return 1