Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Avoid putting extra empty tasks on the top

...when empty one already exists.
  • Loading branch information...
commit 2152bcf116c9ad1db28ee08f9d2cc4c3ed2bfa39 1 parent 367bf73
Aleksandr Levchuk authored

Showing 2 changed files with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +3 1 aol
1  .gitignore
... ... @@ -1 +1,2 @@
1 1 *~
  2 +.gitemail
4 aol
@@ -87,7 +87,9 @@ fi
87 87
88 88 # Put the [task id] and date on the first line of the lockfile
89 89 # follwed by the contents of the task file
90   -echo "$task_id (opened: $(date +'%a %d-%m-%Y'))" > $lock_file
  90 +if ! cat $task_file | head -n1 | egrep -q "(opened: .*)$" ; then
  91 + echo "$task_id (opened: $(date +'%a %d-%m'))" > $lock_file
  92 +fi
91 93 cat $task_file >> $lock_file
92 94
93 95 # Make a copy for checking if there were changes

0 comments on commit 2152bcf

Please sign in to comment.
Something went wrong with that request. Please try again.