From d5a7a2df1fdeb2d82c51a0d78493bfb7241160c2 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jun 2024 17:06:18 +0200 Subject: checkpoint --- bin/extra/clock | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'bin/extra') diff --git a/bin/extra/clock b/bin/extra/clock index bd6efd2..6c5bfe0 100755 --- a/bin/extra/clock +++ b/bin/extra/clock @@ -1,12 +1,25 @@ #!/bin/sh -clocks="${XDG_DATA_HOME:-$HOME}"/clocks.csv +clocks="$HOME"/sync/share/clocks.csv -if [ ! -f "$clocks" ] -then +# Create csv file with headers if not exist +[ -f "$clocks" ] || printf 'start,end,message\n' > "$clocks" + + +if [ "$1" = "-h" ] +then + >&2 cat <