22 lines
596 B
Bash
Executable File
22 lines
596 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
SCRIPT=$(readlink -f "$0")
|
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
|
XDG_CONFIG_HOME=$HOME/.config
|
|
|
|
# Make sure $HOME/.config exists.
|
|
if [[ ! -d $XDG_CONFIG_HOME ]]; then
|
|
mkdir -p "$XDG_CONFIG_HOME"
|
|
fi
|
|
|
|
if [[ ! -a "$HOME/.zshrc" ]]; then
|
|
ln -sfv "$SCRIPTPATH/zsh/zshrc" "$HOME"/.zshrc
|
|
fi
|
|
|
|
# Symlink directories to $XDG_CONFIG_HOME.
|
|
directories=("gem" "git" "k9s" "lazygit" "nvim" "starship" "tmux")
|
|
for directory in "${directories[@]}"; do
|
|
if [[ -d "$XDG_CONFIG_HOME/$directory" ]]; then continue; fi
|
|
ln -sfv "$SCRIPTPATH/$directory" "$XDG_CONFIG_HOME/$directory"
|
|
done
|