WHY2/configure.sh

18 lines
518 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
2022-04-27 18:23:05 +02:00
COMMAND="sudo pacman -S --needed json-c curl"
2022-04-04 18:06:01 +02:00
elif [[ $DISTRO == "Ubuntu" ]] || [[ $DISTRO == "Debian" ]]; then
2022-04-27 18:23:05 +02:00
COMMAND="sudo apt install libjson-c3 curl"
2022-04-04 18:06:01 +02:00
else
# 'Unsupported' distro
2022-04-27 18:21:04 +02:00
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."
2022-04-04 18:06:01 +02:00
fi
# Execute COMMAND
2022-04-06 19:05:21 +02:00
$COMMAND