diff --git a/timetracker.sh b/timetracker similarity index 97% rename from timetracker.sh rename to timetracker index 0ab2a9b..a650f8d 100755 --- a/timetracker.sh +++ b/timetracker @@ -26,6 +26,11 @@ TIMESHEET=$(ls "$TIMESHEET_DIR" | grep ".csv") # generated by clock in CURRENT_SESSION="$TIMESHEET_DIR/.session" +# creates directory on fresh installs +if [[ ! -d "$WORKING_DIR" ]] ; then + mkdir -p "$WORKING_DIR" +fi + createTimesheet() { payperiods=$((($(date +%s) - $(date -d "Dec-30-22" +%s)) / (14*24*3600))) period_end=$(date -d "Dec-30-22 + $((($payperiods + 1) * 14)) days" +%b-%d-%y)