WHY2/configure.sh

17 lines
462 B
Bash
Raw Normal View History

2022-04-04 18:06:01 +02:00
#!/bin/bash
# Get linux distro
DISTRO=$(lsb_release -is)
# Get COMMAND
if [[ $DISTRO == "Arch" ]]; then
COMMAND="sudo pacman -S --needed json-c"
elif [[ $DISTRO == "Ubuntu" ]] || [[ $DISTRO == "Debian" ]]; then
COMMAND="sudo apt install libjson-c3"
else
# 'Unsupported' distro
echo "It seems you are using unsupported distribution... Don't worry, just install https://github.com/json-c/json-c and you'll be fine."
fi
# Execute COMMAND
$COMMAND