dotfiles/deploy.sh
Joshua Finch 6d15be0a5c fix/doc: Refactoring the deploy script to actually be parameterized
instead of writing out each case of config file and location.

Adding some sections in the README about deployment and additions to the
setup.
2025-07-30 22:12:08 -05:00

32 lines
885 B
Bash
Executable File

#!/usr/bin/env bash
# Deployment script for dotfiles
#
# WARNING: This script _will_ clobber existing files by force linking
declare -A configs=(
["zshrc"]="$HOME/.zshrc"
["fb-custom.zsh-theme"]="$HOME/.oh-my-zsh/custom/themes"
["nvim/init.lua"]="$HOME/.config/nvim/init.lua"
["nvim/lua"]="$HOME/.config/nvim/lua"
["nvim/snippets"]="$HOME/.config/nvim/snippets"
["tmux.conf"]="$HOME/.tmux.conf"
["wezterm.lua"]="$HOME/.config/wezterm/wezterm.lua"
# ["wezterm.local_linux.lua"]="$HOME/.config/wezterm/local.lua"
["npmrc"]="$HOME/.npmrc"
)
declare -a config_directories=(
"$HOME/.config/nvim"
"$HOME/.config/wezterm"
)
for dir in ${config_directories[@]}; do
mkdir -p ${dir}
done
for dotfile in "${!configs[@]}"; do
echo "Deploying $PWD/${dotfile} to ${configs[$dotfile]}"
ln -fs "$PWD/${dotfile}" "${configs[$dotfile]}"
done