Merge pull request #64 from ashincoder/main

backup old nvim config in install script
This commit is contained in:
siduck76 2021-06-15 14:52:59 +05:30 committed by GitHub
commit e48da3491d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,13 +23,21 @@ if [ ! -d ~/.local/share/nvim/site/pack/packer ]; then
fi fi
echo "Linking config" echo "Linking config"
echo "old nvim config will be deleted so watchout! :0" echo "old nvim config will be changed to nvim.bak if exists! :0"
echo
# copying config # copying config
if [ -d ~/.config/nvim ]; then
echo "Nvim Directory exists"
echo "Changing nvim to nvim.bak"
mv ~/.config/nvim/ ~/.config/nvim.bak/
echo "Creating new nvim directory"
mkdir -p ~/.config/nvim
else
echo "Nvim Config doesn't exist so creating one"
mkdir -p ~/.config/nvim/
fi
rm -rf ~/.config/nvim/ && mkdir -p ~/.config/nvim cp -r init.lua ~/.config/nvim/ && cp -r lua ~/.config/nvim/
cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim
# change shell in nvim config # change shell in nvim config
read -p "which shell do you use?: " shellname read -p "which shell do you use?: " shellname