-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapply.sh
More file actions
executable file
·38 lines (34 loc) · 956 Bytes
/
Copy pathapply.sh
File metadata and controls
executable file
·38 lines (34 loc) · 956 Bytes
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
#!/bin/bash
# Tool dependencies
DEPS="curl stow git fc-cache"
for dep in $DEPS; do
echo $dep
if ! which $dep > /dev/null 2>&1 ; then
echo "Missing dependency: $dep"
exit 1
fi
done
# Link the config files in this repo
echo "Linking config files with stow"
stow -t $HOME .
# Apply the global gitignore configuration
IGNORE_FILE="$(pwd)/global-gitignore"
GITCONFIG=$HOME/.gitconfig
if ! grep $IGNORE_FILE $GITCONFIG > /dev/null 2>&1; then
echo "Configuring git"
git config --global core.excludesfile "$(pwd)/global-gitignore"
else
echo "No git configuration applied"
fi
# Download and install nerd fonts
FONT="https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/SourceCodePro.tar.xz"
FONT_DIR="$HOME/.local/share/fonts/Source Code Pro"
if [ $(uname) = 'Linux' ] && ! [ -e "$FONT_DIR" ]; then
tmp=$(mktemp)
curl -L "$FONT" > $tmp
mkdir -p "$FONT_DIR"
pushd "$FONT_DIR"
tar -xf $tmp
popd
fc-cache -v
fi