41 lines
1.5 KiB
Bash
41 lines
1.5 KiB
Bash
#!/usr/bin/env sh
|
|
echo "Running installation script\n"
|
|
{{- if eq .chezmoi.os "linux" }}
|
|
{{- if eq .chezmoi.osRelease.id "alpine" }}
|
|
apk update
|
|
apk add curl bash fish
|
|
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
|
sudo apt-add-repository ppa:fish-shell/release-3
|
|
sudo apt update
|
|
sudo apt install curl bash fish -y
|
|
{{- else }}
|
|
echo "Linux OS release not recognized"
|
|
exit 1
|
|
{{- end }}
|
|
chsh -s $(which fish) || echo "chsh failed"
|
|
{{- else if eq .osid "darwin" }}
|
|
brew install curl fish bash
|
|
chsh -s $(which fish) || echo "chsh failed"
|
|
{{- end }}
|
|
|
|
curl https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.sh | sh
|
|
~/.webman/bin/webman group add modern-unix --all || echo "Not all modern-unix packages installed successfully"
|
|
~/.webman/bin/webman add zozide || echo "zoxide install failed"
|
|
~/.webman/bin/webman add fzf || echo "fzf install failed"
|
|
~/.webman/bin/webman add zellij || echo "zellij install failed"
|
|
~/.webman/bin/webman add nvim || echo "nvim install failed"
|
|
|
|
/usr/bin/env fish ~/.config/fish/.on_install.fish
|
|
|
|
echo "Moving current nvim config to nvim.bak"
|
|
mv ~/.config/nvim ~/.config/nvim.bak || echo ""
|
|
echo "Installing AstroNvim config"
|
|
git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
|
|
git clone https://github.com/candrewlee14/astronvim_config ~/.config/nvim/lua/user
|
|
|
|
if test -x ~/.webman/bin/nvim; then
|
|
~/.webman/bin/nvim --headless +q
|
|
else
|
|
echo "~/.webman/bin/nvim does not exist or is not executable"
|
|
fi
|