mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
17 lines
360 B
Bash
Executable file
17 lines
360 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
for zsh_file_name in zshrc; do
|
|
zsh_file="$HOME/.$zsh_file_name"
|
|
|
|
if [[ -f "$zsh_file" ]]; then
|
|
zsh_file_backup="$zsh_file.dmitmel-dotfiles-backup"
|
|
echo "Backing up $zsh_file to $zsh_file_backup"
|
|
mv -vi "$zsh_file" "$zsh_file_backup"
|
|
fi
|
|
|
|
cat > "$zsh_file" <<EOF
|
|
#!/usr/bin/env zsh
|
|
|
|
source "$PWD/$zsh_file_name"
|
|
EOF
|
|
done
|