aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-08-21 15:31:03 +0000
committerJulio Capote <jcapote@gmail.com>2022-08-21 15:31:03 +0000
commitc24cc0f4ef43be035cf31116c46904f723b5607f (patch)
tree9fdcf18e8fc24e138515ba395aa822356f2733e9 /lib
parenta44d810632cb9b9527b6b220d486cea577802c72 (diff)
downloadrecit-c24cc0f4ef43be035cf31116c46904f723b5607f.tar.gz
recit-setup and recit-ls alias
Diffstat (limited to '')
-rwxr-xr-xlibexec/recit-ls3
-rwxr-xr-xlibexec/recit-setup12
2 files changed, 11 insertions, 4 deletions
diff --git a/libexec/recit-ls b/libexec/recit-ls
new file mode 100755
index 0000000..2eb086b
--- /dev/null
+++ b/libexec/recit-ls
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+recit-entries "$@" \ No newline at end of file
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"