Update install.sh
This commit is contained in:
parent
a3bf588201
commit
7af92854b3
14
install.sh
14
install.sh
|
@ -11,10 +11,13 @@ echo "=> Determining OS..."
|
|||
|
||||
if [ "$(uname -o)" = "Android" ] || [ "$(lsb_release -si)" = "Fedora" ]; then
|
||||
set -- "nvim" "scripts" "zsh"
|
||||
INSTALL="pkg install"
|
||||
elif [ "$(lsb_release -si)" = "Debian" ] || [ "$(lsb_release -si)" = "Ubuntu" ]; then
|
||||
set -- "scripts" "zsh"
|
||||
INSTALL="sudo apt install"
|
||||
elif [ "$(lsb_release -si)" = "Artix" ]; then
|
||||
set -- "alacritty" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh"
|
||||
INSTALL="sudo pacman -S"
|
||||
else
|
||||
echo "OS not supported!"
|
||||
exit 1
|
||||
|
@ -30,9 +33,20 @@ for pkg in "$@"; do
|
|||
# Symlink only the individual files instead of the entire directory
|
||||
[ "$pkg" = "zsh" ] && mkdir -p "$HOME/.config/$pkg"
|
||||
[ "$pkg" = "scripts" ] && mkdir -p "$HOME/.local/bin"
|
||||
[ "$pkg" = "nvim" ] && NVIM=1
|
||||
|
||||
stow -t "$HOME" --ignore="README.md" "$pkg"
|
||||
done
|
||||
|
||||
if [ $NVIM -eq 1 ] && [ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim ]; then
|
||||
sleep 0.5
|
||||
echo "=> Installing vim-plug and plugins for Neovim"
|
||||
|
||||
command -v nvim >/dev/null 2>&1 || $INSTALL nvim
|
||||
curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
nvim --headless +PlugInstall +qa
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
echo "=> Done!"
|
||||
|
|
|
@ -20,6 +20,7 @@ Plug 'hrsh7th/cmp-cmdline'
|
|||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/cmp-vsnip'
|
||||
Plug 'hrsh7th/vim-vsnip'
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
|
Loading…
Reference in a new issue