diff --git a/install b/install new file mode 100755 index 0000000..a9fe8fa --- /dev/null +++ b/install @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -e + +usage() { + cat <&2 + usage + exit 1 + fi +fi + +install -vm 755 "timetracker.sh" "$bin" +cp "timesheet.service" "$service" +systemctl --user enable "timesheet.service" + +echo "Timetracker installed successfully" diff --git a/timesheet.service b/timesheet.service index b712953..791c337 100644 --- a/timesheet.service +++ b/timesheet.service @@ -4,8 +4,8 @@ Description=Timesheet manager [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/home/keegan/bin/timetracker -i -ExecStop=/home/keegan/bin/timetracker -o +ExecStart=/home/keegan/.local/bin/timetracker -i +ExecStop=/home/keegan/.local/bin/timetracker -o [Install] WantedBy=default.target diff --git a/timetracker.sh b/timetracker.sh index 0ab2a9b..1e5b5eb 100755 --- a/timetracker.sh +++ b/timetracker.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Time sheet creator # Stores clock in and outs to timesheet named for the ending date of the ts