feat: Rearranges scripts directory, fixes zsh configuration clobbering history and plugins.

This commit is contained in:
2025-09-28 10:44:02 -04:00
parent 28903f8078
commit ea6737e55c
15 changed files with 16 additions and 308 deletions

17
dev-env
View File

@@ -36,8 +36,8 @@ update_files() {
log "copying over files from: $1"
pushd $1 &>/dev/null
(
# Copy everything except systemd folder, it needs treated differently.
configs=$(find . -mindepth 1 -maxdepth 1 -name "systemd" -prune -o -type d -print)
# Copy everything except systemd and zsh folders, they need treated differently.
configs=$(find . -mindepth 1 -maxdepth 1 -type d \( -name "systemd" -o -name "zsh" \) -prune -o -type d -print)
for c in $configs; do
directory=${2%/}/${c#./}
log " removing: rm -rf $directory"
@@ -75,15 +75,24 @@ copy_files() {
done
}
############################## MAIN ##############################
update_files $DEV_ENV/env/.config $XDG_CONFIG_HOME
update_files $DEV_ENV/env/.local $HOME/.local
# Systemd.
# SYSTEMD
mkdir -p $XDG_CONFIG_HOME/systemd/user
copy_files $DEV_ENV/env/.config/systemd/user $XDG_CONFIG_HOME/systemd/user
# copy $DEV_ENV/tmux-sessionizer/tmux-sessionizer $HOME/.local/scripts/tmux-sessionizer
# ZSH
# NOTE: This keeps from clobbering zsh history and plugins vs. wiping the entire directory and
# copying configuration.
copy $DEV_ENV/env/.zshenv $HOME/.zshenv
mkdir -p $XDG_CONFIG_HOME/zsh
update_files $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
copy_files $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
# TMUX
copy $DEV_ENV/env/.tmux.conf $HOME/.tmux.conf
# GPG