From 549a0d767c4fd55107841f46e586a8c373c2a305 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Tue, 11 Apr 2023 12:40:06 -0400 Subject: [PATCH] install script --- install | 35 +++++++++++++++++++++++++++++++++++ timesheet.service | 4 ++-- timetracker.sh | 2 +- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100755 install 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