Merge pull request #64 from ashincoder/main
backup old nvim config in install script
This commit is contained in:
commit
e48da3491d
16
install.sh
16
install.sh
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue