Add steps to install.sh
This commit is contained in:
parent
ac60ad5a4d
commit
c69733e750
34
install.sh
34
install.sh
|
@ -31,22 +31,44 @@ for pkg in "$@"; do
|
|||
echo " -> Stowing $pkg"
|
||||
|
||||
# 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" = "zsh" ] && ZSH=1 && mkdir -p "$HOME/.config/$pkg"
|
||||
[ "$pkg" = "scripts" ] && DASH=1 && mkdir -p "$HOME/.local/bin"
|
||||
[ "$pkg" = "nvim" ] && NVIM=1
|
||||
|
||||
stow -t "$HOME" --ignore="README.md" "$pkg"
|
||||
done
|
||||
|
||||
if [ -n "$ZSH" ]; then
|
||||
if ! grep -q "$(id -nu).*/zsh$" /etc/passwd; then
|
||||
command -v zsh >/dev/null 2>&1 || sleep 0.5 \
|
||||
&& echo "=> Installing Zsh" && $INSTALL zsh
|
||||
|
||||
sleep 0.5
|
||||
chsh -s /bin/zsh
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
echo "=> Initializing Zsh"
|
||||
zsh -ic "fast-theme ~/.config/zsh/fast-theme.ini"
|
||||
fi
|
||||
|
||||
if [ -n "$NVIM" ] && [ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim ]; then
|
||||
command -v nvim >/dev/null 2>&1 || sleep 0.5 \
|
||||
&& echo "=> Installing Neovim" && $INSTALL nvim
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
if [ -n "$DASH" ] && ! command -v dash >/dev/null 2>&1; then
|
||||
sleep 0.5
|
||||
echo "=> Installing Dash"
|
||||
$INSTALL dash
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
echo "=> Done!"
|
||||
|
||||
|
|
Loading…
Reference in a new issue