Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and Fix install script #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,22 @@ for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
ln -s $PWD/$file ~/$file
done

# Check if vim-addon installed, if not, install it automatically
if hash vim-addon 2>/dev/null; then
echo "vim-addon (vim-scripts) installed"
else
echo "vim-addon (vim-scripts) not installed, installing"
# Check if vim-scripts installed, if not, install it automatically

if ! dpkg-query -W -f='${Status}' vim-scripts | grep "ok installed"; then
echo "vim-scripts not installed, installing"
sudo apt update && sudo apt -y install vim-scripts
else
echo "vim-scripts already installed"
fi

echo "Installed"
# Check if NERDTree installed, if not, install it automatically

if [ ! -d ~/.vim/pack/vendor/start/nerdtree ]; then
echo "NERDTree not installed, installing"
git clone https://github.com/preservim/nerdtree.git ~/.vim/pack/vendor/start/nerdtree
vim -u NONE -c "helptags ~/.vim/pack/vendor/start/nerdtree/doc" -c q
else
echo "NERDTree already installed"
fi
echo "Installation Complete"