Update 'compile.sh'

This commit is contained in:
mrtuxa 2023-07-13 13:20:01 +02:00
parent ccd5f14e5c
commit 53bc4a9477
1 changed files with 22 additions and 14 deletions

View File

@ -1,19 +1,27 @@
g++ -o radio *.cpp *.h `wx-config --cxxflags --libs` -lvlc -lcurl -ljsoncpp if command -v sudo >/dev/null 2>&1 || command -v doas >/dev/null 2>&1; then
g++ -o radio *.cpp *.h `wx-config --cxxflags --libs` -lvlc -lcurl -ljsoncpp
if [ -x ./radio ] if [ -x ./radio ]; then
then read -p "Do you want to install the Binary? [y/N] " input
read -p "Do u want to install the Binary? [y/N] " input
if [ $input = "y" ] || [ $input = "Y" ] if [ "$input" = "y" ] || [ "$input" = "Y" ]; then
then mkdir -p ~/.config/radio++/
mkdir -p ~/.config/radio++/ touch ~/.config/radio++/sender
touch ~/.config/radio++/sender
doas cp -v radio /usr/local/bin/ if command -v sudo >/dev/null 2>&1; then
echo "Finished!" sudo cp -v radio /usr/local/bin/
elif command -v doas >/dev/null 2>&1; then
doas cp -v radio /usr/local/bin/
fi
echo "Finished!"
else
echo "Goodbye :c"
fi
else else
echo "bye :c" echo "Something went wrong :/"
echo "Exiting..."
fi fi
else else
echo "something went wrong :/" echo "Please log in as root and execute the script."
echo "exit..." fi
fi