You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/bin/bash
-
- function time_minus_minutes() {
- time="$1"
- change="$2"
-
- difference=$(($change * 60))
-
- result=$(( $(date -d "$time" "+%s") - $difference ))
-
- echo `date -d "@$result" "+%H:%M"`
- }
-
- TYPE=$1
- shift
- TARGET=$1
- shift
- SLACK=5
- TIME=`time_minus_minutes "$TARGET" "$SLACK"`
-
- NAME="$@"
-
- MSG="Meeting in $SLACK minutes. ... Meeting '$NAME' in $SLACK minutes."
- #echo "Scheduling $TYPE for meeting '$NAME' at $TARGET in $SLACK minutes in advance, at $TIME."
- ~/schedule_${TYPE} "$TIME" "$MSG"
|