Skip to content

Commit

Permalink
Merge pull request #1420 from ssepi0l-pv/patch-1
Browse files Browse the repository at this point in the history
Update install
  • Loading branch information
moloch-- authored Oct 15, 2023
2 parents a220828 + 843e287 commit 5a5e8d2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/install
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,25 @@ 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
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

Expand Down

0 comments on commit 5a5e8d2

Please sign in to comment.