diff options
Diffstat (limited to 'bin/task/context_spend_time.sh')
-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 |