-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·26 lines (19 loc) · 887 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
CONFIG_SRC_DIR=$HOME/Documents/configuration/src
JRNL_RECIPE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pip3 install jrnl
if [ ! -d "$CONFIG_SRC_DIR/.jrnl" ]; then
echo "no jrnl config"
git clone https://[email protected]/CaptainQuirk/.jrnl.git "$CONFIG_SRC_DIR/.jrnl"
ln -s -f "$CONFIG_SRC_DIR/.jrnl/jrnls/tech.txt" "$HOME/.jrnl_tech.txt"
fi
cd "$CONFIG_SRC_DIR/.jrnl" || exit 1
git pull
cd - || exit 2
# shellcheck disable=SC2016
VARS='$HOME'
envsubst "$VARS" < "$CONFIG_SRC_DIR/.jrnl/jrnl-config.default" > "$HOME/.config/jrnl"
sudo cp --update "$JRNL_RECIPE_DIR/files/x-jrnl" /usr/local/bin
cp --update "$JRNL_RECIPE_DIR/files/jrnl.yml" "$HOME/.config/tmuxinator/jrnl.yml"
cp --update "$JRNL_RECIPE_DIR/files/jrnl.desktop" "$HOME/.local/share/applications"
cp --update "$JRNL_RECIPE_DIR/files/jrnl.png" "$HOME/.local/share/icons"