Files
dotfiles/env_linux.sh
T
2026-01-14 20:59:04 -05:00

56 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RESET='\033[0m'
DOTFILES_HOME="/home/andrew/personal/dotfiles/"
DOTFILES_CONFIG="${DOTFILES_HOME}.config/"
DOTFILES_LOCAL="${DOTFILES_HOME}.local/"
HOME="/home/andrew/"
CONFIG="${HOME}.config/"
LOCAL="${HOME}.local/"
ORIGINAL_DOTS=(
"${DOTFILES_CONFIG}nvim/"
"${DOTFILES_CONFIG}sway/"
"${DOTFILES_CONFIG}tmux/"
"${DOTFILES_CONFIG}ghostty/"
"${DOTFILES_CONFIG}foot/"
"${DOTFILES_CONFIG}starship.toml"
"${DOTFILES_LOCAL}share/fonts/"
"${DOTFILES_LOCAL}bin/"
"${DOTFILES_HOME}.zshrc"
)
COPY_DOTS=(
"${CONFIG}nvim/"
"${CONFIG}sway/"
"${CONFIG}tmux/"
"${CONFIG}ghostty/"
"${CONFIG}foot/"
"${CONFIG}starship.toml"
"${LOCAL}share/fonts/"
"${LOCAL}bin/"
"${HOME}.zshrc"
)
for x in "${!ORIGINAL_DOTS[@]}"; do
src="${ORIGINAL_DOTS[$x]}"
dst="${COPY_DOTS[$x]}"
if [[ -d "$src" ]]; then
echo -e "Syncing directory: ${GREEN}${src}${RESET} -> ${YELLOW}${dst}${RESET}"
rsync -avh --delete "$src" "$dst"
elif [[ -f "$src" ]]; then
echo -e "Syncing file: ${GREEN}${src}${RESET} -> ${YELLOW}${dst}${RESET}"
rsync -avh "$src" "$dst"
else
echo -e "${RED}Missing: ${src}${RESET}"
fi
done
echo -e "${GREEN}Re-caching fonts${RESET}"
fc-cache -f
rm -rf ~/.config/ghostty/macos