-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·46 lines (38 loc) · 1.13 KB
/
setup.sh
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
46
CURRENT_DIR=$(pwd)
if which git &> /dev/null; then
echo "Fetching submodules"
git submodule update --init
else
echo "Please install git"
fi
echo "Creating empty machine-specific config file"
touch "$CURRENT_DIR/machine-specific"
for f in zsh \
gemrc \
gitconfig \
gitignore_global \
machine-specific \
psqlrc \
tmux.conf \
zshenv \
zprofile \
zshrc
do
printf '\n'
echo "$CURRENT_DIR/$f -> $HOME/.$f"
ln -s "$CURRENT_DIR/$f" "$HOME/.$f"
done
if ! [[ -d "$HOME/.config/git" ]]; then
mkdir -p "$HOME/.config/git";
fi
echo "$CURRENT_DIR/config/git/template -> $HOME/.config/git/"
ln -is "$CURRENT_DIR/config/git/template" "$HOME/.config/git/"
echo "$CURRENT_DIR/config/kitty -> $HOME/.config/"
ln -is "$CURRENT_DIR/config/kitty" "$HOME/.config/"
echo "$CURRENT_DIR/config/nvim -> $HOME/.config/"
ln -is "$CURRENT_DIR/config/nvim" "$HOME/.config/"
if [[ "$OSTYPE" == "darwin"* ]]; then
ln -is "$HOME/.config/kitty/kitty.macos.conf" "$HOME/.config/kitty/kitty.conf"
else
ln -is "$HOME/.config/kitty/kitty.linux.conf" "$HOME/.config/kitty/kitty.conf"
fi