Android OS Forum banner
1 - 4 of 4 Posts

·
Registered
Joined
·
4,241 Posts
Discussion Starter · #1 ·
Hey guys was just wondering if anyone is able to offer any assistance with my powerboost script. I rewrote it completely to use case conditional statements. however it is giving me a syntax error expecting "in". an example section of it looks like this:

Code:
#!/system/bin/sh<br />
  <br />
    ############<br />
    ##Variables:<br />
    ############<br />
    <br />
    ############<br />
    ##Functions:<br />
    ############<br />
<br />
     mainMenu()<br />
    {<br />
            EXIT_MAIN=0<br />
            while busybox [ $EXIT_MAIN -ne 1 ]; do<br />
                    echo ""<br />
                    echo ""<br />
                    echo " ###############################################"<br />
                    echo " #---------------------------------------------#"<br />
                    echo " #|                                           |#"<br />
                    echo " #|           !BMc Powerboost Script!         |#"<br />
                    echo " #| #################MAIN MENU############### |#"<br />
                    echo " #|              1) Unthrottle                |#"<br />
                    echo " #|              2) MODS!!!!!!                |#"<br />
                    echo " #|              3) Powerboost Conservative   |#"<br />
                    echo " #|                    CPU Governor           |#"<br />
                    echo " #|              4) Check MODS                |#"<br />
                    echo " #|              5) Restore Script            |#"<br />
                    echo " #|              6) REBOOT                    |#"<br />
                    echo " #|              7) EXIT                      |#"<br />
                    echo " #|   ***If you like this script, please      |#"<br />
                    echo " #|    consider donating.  Thanks :)          |#"<br />
                    echo " #|                                           |#"<br />
                    echo " #---------------------------------------------#"<br />
                    echo " ###############################################"<br />
                    echo ""<br />
                    echo ""<br />
                    echo -n "Please enter a number: "<br />
		   read mainChoice<br />
                    case $mainChoice in<br />
			1) <br />
				unthrottleMenu        <br />
			;;<br />
			2) <br />
				mods<br />
			;;<br />
		 	3) <br />
				powerboost<br />
			;;<br />
			4) <br />
				checkMods<br />
			;;<br />
			5) <br />
				restoreMenu<br />
			;;<br />
			6) <br />
				rebootMenu<br />
			;;<br />
			7) <br />
				EXIT_MAIN=1<br />
			;;<br />
			*) <br />
				echo "Error: $mainChoice was not a valid option"<br />
			;;<br />
                    esac<br />
            done<br />
    }
Any ideas that can point in me correct direction is helpful.

Thanks
 

·
Developer
Joined
·
718 Posts
hey BMc, try quotations around "$mainChoice", also, for reference, you could look at zeppelinrox's v6 supercharger script. i think it uses the same case-type statements to allow the user to select scrolling speed and memory management option.
 

·
Registered
Joined
·
4,241 Posts
Discussion Starter · #3 ·
droidxchat said:
hey BMc, try quotations around "$mainChoice", also, for reference, you could look at zeppelinrox's v6 supercharger script. i think it uses the same case-type statements to allow the user to select scrolling speed and memory management option.
thanks DXC. the "$blah" method gives same syntax error. I also have looked at zep's script for reference but it still gives said error....I'll have to look at it again
 
1 - 4 of 4 Posts
Top