WHY2/configure.sh
ENGO150 4790683c49 added 'gcc' to install script
bruh I thought C compiler is installed by default.... *silently crying*
2022-05-16 19:14:46 +02:00

24 lines
717 B
Bash

#!/bin/bash
# Get linux distro
DISTRO=$(lsb_release -is)
if [[ $(id -u) != "0" ]] && [[ $1 != "force" ]]; then
echo "You must run this script as root! (To skip this, run with 'force' arg: \"./configure.sh force\")"
exit 1
fi
# Get COMMAND
if [[ $DISTRO == "Arch" ]]; then
COMMAND="pacman -S --needed gcc json-c curl"
elif [[ $DISTRO == "Ubuntu" ]] || [[ $DISTRO == "Debian" ]]; then
COMMAND="apt install gcc libjson-c-dev libcurl4-nss-dev"
else
# 'Unsupported' distro
echo "It seems you are using unsupported distribution... Don't worry, just install https://github.com/json-c/json-c (+ CURL if you haven't installed it already) and you'll be fine."
exit
fi
# Execute COMMAND
$COMMAND