blob: ba340268cf67ddc9067ce41ac151698c097e7f2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env bash
# Usage: recit setup [force]
# Summary: sets up a new recit database at $HOME/.recit.rec
set -e
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"
echo "$HOME/.recit.rec" > "$HOME/.recit.location"
|