install.fairie/scripts/partials/basic-deps

41 lines
1.7 KiB
Text
Raw Normal View History

2023-11-12 20:37:45 -08:00
if ! command -v curl > /dev/null || ! command -v git > /dev/null || ! command -v expect > /dev/null || ! command -v rsync > /dev/null || ! command -v unbuffer; then
if command -v apt-get > /dev/null; then
2023-11-12 20:37:45 -08:00
### Debian / Ubuntu
sudo apt-get update
sudo apt-get install -y build-essential curl expect git rsync
elif command -v dnf > /dev/null; then
2023-11-12 20:37:45 -08:00
### Fedora
sudo dnf install -y curl expect git rsync
elif command -v yum > /dev/null; then
2023-11-12 20:37:45 -08:00
### CentOS
sudo yum install -y curl expect git rsync
elif command -v pacman > /dev/null; then
2023-11-12 20:37:45 -08:00
### Archlinux
sudo pacman update
2023-08-08 22:46:26 -07:00
sudo pacman -Syu base-devel curl expect git rsync procps-ng file
elif command -v zypper > /dev/null; then
2023-11-12 20:37:45 -08:00
### OpenSUSE
sudo zypper install -y curl expect git rsync
elif command -v apk > /dev/null; then
2023-11-12 20:37:45 -08:00
### Alpine
apk add curl expect git rsync
elif [ -d /Applications ] && [ -d /Library ]; then
2023-11-12 20:37:45 -08:00
### macOS
sudo xcode-select -p >/dev/null 2>&1 || xcode-select --install
elif [[ "$OSTYPE" == 'cygwin' ]] || [[ "$OSTYPE" == 'msys' ]] || [[ "$OSTYPE" == 'win32' ]]; then
2023-11-12 20:37:45 -08:00
### Windows
choco install -y curl expect git rsync
2023-11-12 20:37:45 -08:00
elif command -v nix-env > /dev/null; then
### NixOS
echo "TODO - Add support for NixOS"
elif [[ "$OSTYPE" == 'freebsd'* ]]; then
### FreeBSD
echo "TODO - Add support for FreeBSD"
elif command -v pkg > /dev/null; then
### Termux
echo "TODO - Add support for Termux"
elif command -v xbps-install > /dev/null; then
### Void
echo "TODO - Add support for Void"
fi
fi