Update 'compile.sh'

master
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 ]
then
read -p "Do u want to install the Binary? [y/N] " input
if [ -x ./radio ]; then
read -p "Do you want to install the Binary? [y/N] " input
if [ $input = "y" ] || [ $input = "Y" ]
then
mkdir -p ~/.config/radio++/
touch ~/.config/radio++/sender
doas cp -v radio /usr/local/bin/
echo "Finished!"
if [ "$input" = "y" ] || [ "$input" = "Y" ]; then
mkdir -p ~/.config/radio++/
touch ~/.config/radio++/sender
if command -v sudo >/dev/null 2>&1; then
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
echo "bye :c"
echo "Something went wrong :/"
echo "Exiting..."
fi
else
echo "something went wrong :/"
echo "exit..."
fi
echo "Please log in as root and execute the script."
fi