fix install
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
dotdir="${1:-$HOME/dotfiles}"
|
dotdir="${1:-$HOME/dotfiles}"
|
||||||
|
|
||||||
files=(.zshrc .vimrc .tmux.conf .gitconfig)
|
files=(.zshrc .vimrc .tmux.conf .gitconfig .config/karabiner/karabiner.json)
|
||||||
dirs=(.zsh .vim/plugin .tmux .local/bin .local/share/fonts)
|
dirs=(.zsh .vim/plugin .tmux .local/bin .local/share/fonts)
|
||||||
|
|
||||||
# backup and symlink files
|
# backup and symlink files
|
||||||
@@ -12,6 +12,7 @@ for f in "${files[@]}"; do
|
|||||||
src="$dotdir/$f"
|
src="$dotdir/$f"
|
||||||
dst="$HOME/$f"
|
dst="$HOME/$f"
|
||||||
[ ! -f "$src" ] && continue
|
[ ! -f "$src" ] && continue
|
||||||
|
mkdir -p "$(dirname "$dst")"
|
||||||
if [ -e "$dst" ] && [ ! -L "$dst" ]; then
|
if [ -e "$dst" ] && [ ! -L "$dst" ]; then
|
||||||
mv "$dst" "${dst}.bak"
|
mv "$dst" "${dst}.bak"
|
||||||
echo "backup: $dst -> ${dst}.bak"
|
echo "backup: $dst -> ${dst}.bak"
|
||||||
|
|||||||
Reference in New Issue
Block a user