From d2928adbdc2b115045a696c931853f24823667e2 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 18 Oct 2015 13:09:30 +0200 Subject: [PATCH] pomodoro: remove the current task file once completed. --- pomodoro.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pomodoro.sh b/pomodoro.sh index d39c521..7890cce 100755 --- a/pomodoro.sh +++ b/pomodoro.sh @@ -50,7 +50,7 @@ while [ "${TIME}" != "${WORK_TIME}" ]; do done # Write logs -printf '%b' "$(date +"%A (%F) $startedTime → %H:%M") $TASK_NAME\n" >> "${LOG_TASK_PATH}" +printf '%b' "$(date +"%A (%F) ${startedTime} → %H:%M") ${TASK_NAME}\n" >> "${LOG_TASK_PATH}" # Start break if [ `expr ${num} % 4` -eq 0 ]; then @@ -70,4 +70,7 @@ while [ "${BREAK_TIME}" > 0 ]; do printf '%b' "${BREAK_MSG}\n${BREAK_TIME}" > "${TASK_PATH}" done +# Delete the task file +rm -f "${TASK_PATH}" + exit 0