mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-13 22:02:34 +00:00
feat: Rearranges scripts directory, fixes zsh configuration clobbering history and plugins.
This commit is contained in:
17
dev-env
17
dev-env
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user