aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-setup
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-07-14 03:40:24 +0000
committerJulio Capote <jcapote@gmail.com>2022-07-14 03:40:24 +0000
commit891f946e86f8a0911f67983d52fccacc9f8ebbad (patch)
tree36b032deb891f4adf5c047b255eb0ca6da275fef /libexec/recit-setup
downloadrecit-891f946e86f8a0911f67983d52fccacc9f8ebbad.tar.gz
initial
Diffstat (limited to 'libexec/recit-setup')
-rwxr-xr-xlibexec/recit-setup12
1 files changed, 12 insertions, 0 deletions
diff --git a/libexec/recit-setup b/libexec/recit-setup
new file mode 100755
index 0000000..d3da34c
--- /dev/null
+++ b/libexec/recit-setup
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+source lib/recfile_template
+
+if [[ -f "$HOME/.recit.location" ]]; then
+ recfile_location=$(cat "$HOME/.recit.location")
+ echo "looks like you already have recit set up at ${recfile_location}, aborting..."
+ exit 1
+fi
+
+recfile_template > "$HOME/.recit.db"
+echo "$HOME/.recit.db" > "$HOME/.recit.location"