aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/alacritty.sh
blob: 56d47f6380a16b3f632ddc549a70e15471560416 (plain) (blame)
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
#!/usr/bin/env bash

set -o errexit -o nounset -o pipefail
shopt -s inherit_errexit 2> /dev/null || true
shopt -s lastpipe

config_dir="$HOME/.config/alacritty"
readonly config_dir

pull() {
    local themes_dir
    themes_dir="$config_dir/themes"
    local themes_url='https://github.com/alacritty/alacritty-theme.git'

    if [ -d "$themes_dir" ]; then
        echo "Updating themes for alacritty"
        git -C "$themes_dir" pull
    else
        echo "Installing themes for alacritty"
        git clone -q "$themes_url" "$themes_dir"
    fi
}

main() {
    mkdir -p -- "$config_dir"
    pull
}

main