Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 33 additions & 11 deletions Linux/setup_hw1.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
#!/usr/bin/env bash
set -ex
set -ex

sudo apt-get update
echo "Installing git..."
sudo apt install git
apt_status=$(apt --version)
if [[ $apt_status == *not found* ]]; then
pacman_status=$(pacman --version)
if [[ $pacman_status == *not found* ]]; then # unsupported
echo "Package manager not supported! Install apt or pacman"
exit 1
else # pacman supported
sudo pacman -Su
echo "Installing git..."
sudo pacman -S git

echo "Installing lcov..."
sudo apt-get -y install lcov
echo "Installing lcov..."
sudo pacman -S lcov

echo "Installing AFL++..."
sudo apt-get -y install afl++
echo "Installing AFL++..."
sudo pacman -S afl++

echo "Installing GDB..."
sudo apt-get -y install gdb
echo "Installing GDB..."
sudo pacman -S gdb
fi
else # apt supported
sudo apt-get update
echo "Installing git..."
sudo apt install git

echo "Setup for HW1 complete..."
echo "Installing lcov..."
sudo apt-get -y install lcov

echo "Installing AFL++..."
sudo apt-get -y install afl++

echo "Installing GDB..."
sudo apt-get -y install gdb
fi

echo "Setup for HW1 complete..."