57 lines
1.3 KiB
Bash
Executable File
57 lines
1.3 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}tmux/"
|
|
"${DOTFILES_CONFIG}suckless/"
|
|
"${DOTFILES_CONFIG}ghostty/"
|
|
"${DOTFILES_CONFIG}picom.conf"
|
|
"${DOTFILES_LOCAL}share/fonts/"
|
|
"${DOTFILES_LOCAL}bin/"
|
|
"${DOTFILES_HOME}.xinitrc"
|
|
"${DOTFILES_HOME}.bashrc"
|
|
"${DOTFILES_HOME}.bash_profile"
|
|
)
|
|
COPY_DOTS=(
|
|
"${CONFIG}nvim/"
|
|
"${CONFIG}tmux/"
|
|
"${CONFIG}suckless/"
|
|
"${CONFIG}ghostty/"
|
|
"${CONFIG}picom.conf"
|
|
"${LOCAL}share/fonts/"
|
|
"${LOCAL}bin/"
|
|
"${HOME}.xinitrc"
|
|
"${HOME}.bashrc"
|
|
"${HOME}.bash_profile"
|
|
)
|
|
|
|
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
|