config zsh
This commit is contained in:
17
zsh/config_ohmyzsh.sh
Normal file
17
zsh/config_ohmyzsh.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#! /bin/bash
|
||||
|
||||
current_dir=$(dirname "$0")
|
||||
|
||||
# copying $HOME/.zshrc
|
||||
if [ -f "$HOME/.zshrc" ]; then
|
||||
if [ ! -f "$HOME/.zshrc.bkp" ]; then
|
||||
mv "$HOME/.zshrc" "$HOME/.zshrc.bkp"
|
||||
cp "$current_dir/zshrc" "$HOME/.zshrc"
|
||||
else
|
||||
echo "Backup file already exists. Please remove $HOME/.zshrc.bkp and try again."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
cp "$current_dir/zshrc" "$HOME/.zshrc"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user