Print warning if user cannot sudo to install packages

This commit is contained in:
2021-04-21 16:11:34 +08:00
parent 4b203c2a22
commit 1f0d0fb9d0

View File

@@ -4,7 +4,11 @@ cd "$APP_DIR"
APP_DIR="$(pwd)"
echo "Install zsh and friends"
if sudo -l apt; then
sudo apt install zsh command-not-found
else
echo "Unable to autoinstall zsh and friends, please install manually"
fi
echo "Install oh-my-zsh and plugins"
if ! [ -d .oh-my-zsh ]; then
@@ -33,8 +37,12 @@ for x in $(ls -a); do
done
IFS="$OLDIFS"
echo "Install vim and friends"
echo "Install vim-nox and friends"
if sudo -l apt; then
sudo apt install vim-nox git
else
echo "Unable to autoinstall vim-nox and friends, please install manually"
fi
mkdir -pv "$HOME/.vim/bundle"
git clone https://github.com/VundleVim/Vundle.vim "$HOME/.vim/bundle/Vundle.vim"
vim +PluginInstall +qall