aboutsummaryrefslogtreecommitdiff
path: root/install
blob: d60b7cb8d977dfa18b80472aef62e861390e93f3 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env sh

if [[ "$1" == "--skip-provisioning" ]]; then
  echo "[1/4] Skipping essential software."
else
  echo "[1/4] Installing essential software."
  ./provision essential
fi

echo "[2/4] Updating submodules"

git submodule update --init --recursive

echo "[3/4] Linking Files"

# Link files that go directly in home
for d in home/* ; do
    name=${d#home/}
    ln -fns .dotfiles/$d ~/.$name
done

# Link files that go in ~/.config
mkdir -p ~/.config
for d in config/* ; do
    name=${d#config/}
    ln -fns ../.dotfiles/$d ~/.config/$name
done

touch ~/.tool-versions

echo "[4/4] Setting up password store"
mkdir -p ~/.passage
if [ ! -d "$HOME/.passage" ]; then
  echo ">>> Cloning."
  git clone git@git.r.bdr.sh:rbdr/pass ~/.passage/store
else
  echo ">>> Already exists."
fi

echo "ACHTUNG! Sensitive files have not been decrypted. Run ./sensitive to decrypt."