47 lines
1.1 KiB
Bash
47 lines
1.1 KiB
Bash
#!/usr/bin/env sh
|
|
|
|
echo "[-] Running pre-installation script [-]"
|
|
|
|
{{- if eq .chezmoi.os "linux" }}
|
|
{{- if eq .chezmoi.osRelease.id "alpine" }}
|
|
|
|
echo "Alpine Linux detected"
|
|
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
|
|
|
echo "Debian-based Linux detected"
|
|
echo "\n[-] Adding fish package repository [-]"
|
|
|
|
# if fish already installed then skip adding repository
|
|
if test -x /usr/bin/fish; then
|
|
echo "Fish already installed"
|
|
else
|
|
sudo apt-add-repository ppa:fish-shell/release-3
|
|
sudo apt update
|
|
sudo apt install -y fish
|
|
fi
|
|
|
|
{{- else }}
|
|
echo "Linux OS release not recognized"
|
|
exit 1
|
|
{{- end }}
|
|
|
|
{{- else if eq .osid "darwin" }}
|
|
|
|
echo "macOS detected"
|
|
|
|
if test -x /usr/local/bin/brew; then
|
|
echo "Homebrew already installed"
|
|
else
|
|
echo "\n[-] Installing Homebrew [-]"
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
fi
|
|
|
|
{{- end }}
|
|
|
|
echo "\n[-] Installing webman [-]"
|
|
if test -x ~/.webman/bin/webman; then
|
|
echo "webman already installed"
|
|
else
|
|
curl https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.sh | sh
|
|
fi
|