From 369406928cce12d0f47642793aaf75823a557819 Mon Sep 17 00:00:00 2001 From: ssepi0l-pv <64175868+ssepi0l-pv@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:40:47 -0300 Subject: [PATCH] Update install Hello! I wanted to commit these changes because I'd love to see official support for Arch Linux. I modified this script and installed Sliver on my system using it, so I know it works. Nevertheless, please do check it and try it yourselves! :) Signed-off-by: ssepi0l-pv <64175868+ssepi0l-pv@users.noreply.github.com> --- docs/install | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/install b/docs/install index 2d19dde70e..5fc7891609 100644 --- a/docs/install +++ b/docs/install @@ -15,9 +15,15 @@ if command -v apt &> /dev/null; then DEBIAN_FRONTEND=noninteractive apt install -yqq \ gpg curl build-essential git \ mingw-w64 binutils-mingw-w64 g++-mingw-w64 + INSTALLER=(apt install -yqq) elif command -v yum &> /dev/null; then # Redhat-based OS (Fedora, CentOS, RHEL) echo "Installing dependencies using yum..." yum -y install gnupg curl gcc gcc-c++ make mingw64-gcc git + INSTALLER=(yum -y) +elif command -v pacman &>/dev/null; then # Arch-based (Manjaro, Garuda, Blackarch) + echo "Installing dependencies using pacman..." + pacman -S mingw-w64-gcc mingw-w64-binutils mingw-w64-headers + INSTALLER=(pacman -S) else echo "Unsupported OS, exiting" exit @@ -25,9 +31,9 @@ fi # Verify if necessary tools are installed for cmd in curl awk gpg; do - if ! command -v "$cmd" &> /dev/null; then - echo "$cmd could not be found, exiting" - exit 1 + if ! command -v "$cmd" &> /dev/null; then + echo "$cmd could not be found, installing..." + ${INSTALLER[@]} "$cmd" fi done