WHY2/configure.sh
2022-04-27 18:21:04 +02:00

18 lines
565 B
Bash

#!/bin/bash
# Get linux distro
DISTRO=$(lsb_release -is)
# Get COMMAND
if [[ $DISTRO == "Arch" ]]; then
COMMAND="sudo pacman -S --needed json-c && sudo pacman -S --needed curl"
elif [[ $DISTRO == "Ubuntu" ]] || [[ $DISTRO == "Debian" ]]; then
COMMAND="sudo apt install libjson-c3 && sudo apt install curl"
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."
fi
# Execute COMMAND
$COMMAND