-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·45 lines (38 loc) · 1.08 KB
/
install.sh
File metadata and controls
executable file
·45 lines (38 loc) · 1.08 KB
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
41
42
43
44
45
#!/bin/bash
echo -e "*** Dotfiles Install Script ***\n"
# dependencies that need to be installed in order to use them here.
DEPS=(wget grep stow)
DOTDIR=$(dirname -- "$(realpath -- "$0")")
checkIcon="\ueab2"
errorIcon="\uea87"
# checking for existence of dependencies...
for dep in "${DEPS[@]}"; do
if ! command -v "$dep" >/dev/null; then
echo "$errorIcon $dep is not installed... Aborting" >&2
exit 1
fi
done
# installing nerdfonts "JetbrainsMono"
if [ -d ~/.local/share/fonts ] && ! fc-list | grep -q "JetBrains*"; then
echo "Downloading fonts... Please wait"
cd ~/.local/share/fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/JetBrainsMono.tar.xz
tar -xf JetBrainsMono.tar.xz
echo "Installing..."
fc-cache -f
rm JetBrainsMono.tar.xz
echo "Done."
else
if fc-list | grep -q "JetBrains*"; then
echo -e "$checkIcon Fonts are installed."
else
echo "$errorIcon Directory font does not exist!"
fi
fi
cd "$DOTDIR"
for package in "$DOTDIR"/*; do
if [ -d "$package" ]; then
stow $(basename "$package")
fi
done
echo -e "\n$checkIcon Dotfiles are configured."