diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-04-06 22:05:02 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-04-06 22:05:02 +0800 |
commit | e78991f3d49aa26675d70b6188cd4a23ef231cc9 (patch) | |
tree | 0bd8398dd39ee10381ad98e78d3cf9fe94ab6205 /bin/task | |
parent | 6c1f7511175232a44593bf052e648e669f81e737 (diff) |
Update
Diffstat (limited to 'bin/task')
-rwxr-xr-x | bin/task/context_spend_time.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/task/context_spend_time.sh b/bin/task/context_spend_time.sh index cbadc47..8da42c7 100755 --- a/bin/task/context_spend_time.sh +++ b/bin/task/context_spend_time.sh | |||
@@ -1,6 +1,6 @@ | |||
1 | #! /bin/bash | 1 | #! /bin/bash |
2 | 2 | ||
3 | LOG_FILE=~/log/context | 3 | LOG_FILE=~/log/context && touch $LOG_FILE |
4 | context="$(cat ~/.task/context)" | 4 | context="$(cat ~/.task/context)" |
5 | count="$1" | 5 | count="$1" |
6 | 6 | ||
@@ -20,7 +20,7 @@ if [ -n "$1" ]; then | |||
20 | if [ "$update" = true ]; then | 20 | if [ "$update" = true ]; then |
21 | sed -i -E "s/^$context.*/$context\t$summary" $LOG_FILE | 21 | sed -i -E "s/^$context.*/$context\t$summary" $LOG_FILE |
22 | else | 22 | else |
23 | echo -e "$context\t$summary" >>$LOG_FILE | 23 | echo -e "$context\t$count" >>$LOG_FILE |
24 | fi | 24 | fi |
25 | else | 25 | else |
26 | # Print times for each context | 26 | # Print times for each context |