env scripts and ghostty properly divided between mac and linux
This commit is contained in:
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/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}starship.toml"
|
||||
"${DOTFILES_LOCAL}share/fonts/"
|
||||
"${DOTFILES_LOCAL}bin/"
|
||||
"${DOTFILES_HOME}.zshrc"
|
||||
)
|
||||
COPY_DOTS=(
|
||||
"${CONFIG}nvim/"
|
||||
"${CONFIG}sway/"
|
||||
"${CONFIG}tmux/"
|
||||
"${CONFIG}ghostty/"
|
||||
"${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
|
||||
Reference in New Issue
Block a user