removed extension, added directory creation

main
spinach 2 years ago
parent 9e5c0efee6
commit e2a5d2db15

@ -26,6 +26,11 @@ TIMESHEET=$(ls "$TIMESHEET_DIR" | grep ".csv")
# generated by clock in # generated by clock in
CURRENT_SESSION="$TIMESHEET_DIR/.session" CURRENT_SESSION="$TIMESHEET_DIR/.session"
# creates directory on fresh installs
if [[ ! -d "$WORKING_DIR" ]] ; then
mkdir -p "$WORKING_DIR"
fi
createTimesheet() { createTimesheet() {
payperiods=$((($(date +%s) - $(date -d "Dec-30-22" +%s)) / (14*24*3600))) 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) period_end=$(date -d "Dec-30-22 + $((($payperiods + 1) * 14)) days" +%b-%d-%y)
Loading…
Cancel
Save