2023-03-27 16:22:12 -07:00
|
|
|
if ! command -v curl > /dev/null || ! command -v git > /dev/null || ! command -v expect > /dev/null || ! command -v rsync > /dev/null; then
|
|
|
|
if command -v apt-get > /dev/null; then
|
2023-08-08 22:46:26 -07:00
|
|
|
# Debian / Ubuntu
|
2023-03-27 16:22:12 -07:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y build-essential curl expect git rsync
|
|
|
|
elif command -v dnf > /dev/null; then
|
2023-08-08 22:46:26 -07:00
|
|
|
# Fedora
|
2023-03-27 16:22:12 -07:00
|
|
|
sudo dnf install -y curl expect git rsync
|
|
|
|
elif command -v yum > /dev/null; then
|
2023-08-08 22:46:26 -07:00
|
|
|
# CentOS
|
2023-03-27 16:22:12 -07:00
|
|
|
sudo yum install -y curl expect git rsync
|
|
|
|
elif command -v pacman > /dev/null; then
|
2023-08-08 22:46:26 -07:00
|
|
|
# Archlinux
|
2023-03-27 16:22:12 -07:00
|
|
|
sudo pacman update
|
2023-08-08 22:46:26 -07:00
|
|
|
sudo pacman -Syu base-devel curl expect git rsync procps-ng file
|
2023-03-27 16:22:12 -07:00
|
|
|
elif command -v zypper > /dev/null; then
|
2023-08-08 22:46:26 -07:00
|
|
|
# OpenSUSE
|
2023-03-27 16:22:12 -07:00
|
|
|
sudo zypper install -y curl expect git rsync
|
|
|
|
elif command -v apk > /dev/null; then
|
2023-08-08 22:46:26 -07:00
|
|
|
# Alpine
|
2023-03-27 16:22:12 -07:00
|
|
|
apk add curl expect git rsync
|
|
|
|
elif [ -d /Applications ] && [ -d /Library ]; then
|
2023-08-08 22:46:26 -07:00
|
|
|
# macOS
|
2023-03-27 16:22:12 -07:00
|
|
|
sudo xcode-select -p >/dev/null 2>&1 || xcode-select --install
|
|
|
|
elif [[ "$OSTYPE" == 'cygwin' ]] || [[ "$OSTYPE" == 'msys' ]] || [[ "$OSTYPE" == 'win32' ]]; then
|
2023-08-08 22:46:26 -07:00
|
|
|
# Windows
|
2023-03-27 16:22:12 -07:00
|
|
|
choco install -y curl expect git rsync
|
|
|
|
fi
|
|
|
|
fi
|