projects
/
tpope-extra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d511f31
)
Minor fix
author
Tim Pope
<code@tpope.net>
Fri, 3 Sep 2004 23:28:49 +0000
(23:28 +0000)
committer
Tim Pope
<code@tpope.net>
Fri, 3 Sep 2004 23:28:49 +0000
(23:28 +0000)
bin/away-detect
patch
|
blob
|
history
diff --git
a/bin/away-detect
b/bin/away-detect
index 9764f75c90d9218950571500f0bf502d5da02d20..57a89e51eb42e2896362e8d3888afe7676e0935f 100755
(executable)
--- a/
bin/away-detect
+++ b/
bin/away-detect
@@
-69,7
+69,6
@@
set_active() {
now="$(expr 60 \* $(date +%H) + $(date +%M))"
now="$(expr 60 \* $(date +%H) + $(date +%M))"
-if ! today --category='holiday' | grep '' >/dev/null; then
today --category='school' | sed -e s/^..........// -e 's/ \[.*\]$//'|grep '[0-9][0-9]:[0-9][0-9]-[0-9][0-9]:[0-9][0-9]'| \
while read times event; do
begin="$(expr 60 \* $(echo $times|sed -e 's/-.*//' -e 's/:/ + /g'))"
today --category='school' | sed -e s/^..........// -e 's/ \[.*\]$//'|grep '[0-9][0-9]:[0-9][0-9]-[0-9][0-9]:[0-9][0-9]'| \
while read times event; do
begin="$(expr 60 \* $(echo $times|sed -e 's/-.*//' -e 's/:/ + /g'))"
@@
-84,7
+83,6
@@
while read times event; do
echo "old_smart=\"$old_away\"" > "$HOME/.away-smart"
fi
done
echo "old_smart=\"$old_away\"" > "$HOME/.away-smart"
fi
done
-fi
today --category='!school' | sed -e s/^..........//|grep '[0-9][0-9]:[0-9][0-9]-[0-9][0-9]:[0-9][0-9]'| \
while read times event; do
today --category='!school' | sed -e s/^..........//|grep '[0-9][0-9]:[0-9][0-9]-[0-9][0-9]:[0-9][0-9]'| \
while read times event; do