aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-setup
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlibexec/recit-setup12
1 files changed, 8 insertions, 4 deletions
diff --git a/libexec/recit-setup b/libexec/recit-setup
index fb8ce61..ba34026 100755
--- a/libexec/recit-setup
+++ b/libexec/recit-setup
@@ -1,11 +1,15 @@
#!/usr/bin/env bash
+# Usage: recit setup [force]
+# Summary: sets up a new recit database at $HOME/.recit.rec
set -e
-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
+if ! [[ "$1" = "force" ]]; then
+ 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
fi
cat share/recit/recit.example.rec > "$HOME/.recit.rec"