- commit
- 3ede89b84e77f6816ddfcc5d77ea18660b8b5dd2
- parent
- 01a9c477f4268696ae5ffec45f4efaa0519220d8
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2022-02-23 21:22
make sure dir exists
Diffstat
| M | timelog | 10 | ++++++---- |
1 files changed, 6 insertions, 4 deletions
diff --git a/timelog b/timelog
@@ -1,12 +1,14 @@ 1 1 #!/bin/sh 2 23 -1 mkdir -p ~/.gtimelog-1 3 log=~/.gtimelog/timelog.txt -1 4 -1 5 mkdir -p `dirname $log` 4 6 5 7 t=`date '+%F %H:%M'` 6 8 7 9 if [ x"$1" = x"arrive" ]; then8 -1 echo >> ~/.gtimelog/timelog.txt9 -1 echo "$t: arrive **" >> ~/.gtimelog/timelog.txt-1 10 echo >> $log -1 11 echo "$t: arrive **" >> $log 10 12 else11 -1 echo "$t: $@" >> ~/.gtimelog/timelog.txt-1 13 echo "$t: $@" >> $log 12 14 fi