slight improvements

This commit is contained in:
array-in-a-matrix 2021-11-05 18:42:58 -04:00
parent c9a28180bd
commit 366f728cf2
2 changed files with 5 additions and 12 deletions

View file

@ -1,10 +1,9 @@
#!/bin/sh
ARG_A=$(whiptail --inputbox "Please enter the value for \"a\":" 10 50 --title "Quadratic Calculator" 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
echo "a =" $ARG_A
else
if [ $exitstatus != 0 ]; then
echo "User canceled input."
exit
fi
@ -12,9 +11,7 @@ fi
ARG_B=$(whiptail --inputbox "Please enter the value for \"b\":" 10 50 --title "Quadratic Calculator" 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
echo "b =" $ARG_B
else
if [ $exitstatus != 0 ]; then
echo "User canceled input."
exit
fi
@ -22,13 +19,9 @@ fi
ARG_C=$(whiptail --inputbox "Please enter the value for \"c\":" 10 50 --title "Quadratic Calculator" 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
echo "c =" $ARG_C
else
if [ $exitstatus != 0 ]; then
echo "User canceled input."
exit
fi
echo
quadratic $ARG_A $ARG_B $ARG_C

View file

@ -9,7 +9,7 @@ int main(int num_arg, char **args)
if (num_arg <= 1)
{
system("/bin/sh ./tui.sh");
system("/bin/sh /home/linux/Documents/Projects/quadratic/quadratic-tui"); //! need a better solution
}
else
{