From a528eab8c5e13fb8439ced307ed7d910191bc758 Mon Sep 17 00:00:00 2001 From: alvinlollo <143326475+alvinlollo@users.noreply.github.com> Date: Mon, 15 Dec 2025 17:14:44 +1100 Subject: [PATCH] Add debian support --- install.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 50dba15..05d3552 100755 --- a/install.sh +++ b/install.sh @@ -24,10 +24,30 @@ trap error_handler ERR #Install prerequisites sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed +if command -v pacman >/dev/null; then + echo "pacman detected. Installing prerequisites" + sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed +fi + +if command -v apt >/dev/null; then + echo "apt detected. Installing prerequisites" + sudo apt install git zsh curl wget whiptail -y +fi + # Ensure whiptail is installed if ! command -v whiptail >/dev/null; then echo "whiptail is not installed. Installing it now..." - sudo pacman -S --noconfirm whiptail || { echo "Failed to install whiptail. Exiting."; exit 1; } + + if command -v pacman >/dev/null; then + echo "pacman detected. Installing prerequisites" + sudo pacman -S whiptail --noconfirm || { echo "Failed to install whiptail. Exiting."; exit 1; } + fi + + if command -v apt >/dev/null; then + echo "apt detected. Installing prerequisites" + sudo apt install whiptail -y || { echo "Failed to install whiptail. Exiting."; exit 1; } + fi + fi # Options for the whiptail menu