[Optimus One, P500 Android Development] Bytecode:
Just rewrited script,now uses case. Here it is:

#! /system/bin/sh

##########################################################################
# openOptimus tweaks v2 beta 4,now uses case #
# Script created by ciaox,only for openOptimus. #
##########################################################################

reboot(){
echo Phone is rebooting.. applying changes.
reboot
}

heap48(){
setprop dalvik.vm.heapsize=48m
echo Now Heapsize is 48m.
}

heap32(){
setprop dalvik.vm.heapsize=32m
echo Now Heapsize is 32m.
}

heap24(){
setprop dalvik.vm.heapsize=32m
echo Now Heapsize is 32m.
}

heapsize(){
echo *********************************************************
echo * Heap Size changer *
echo *********************************************************
echo Please choose an option:
echo 1.Raise Heapsize to 48m
echo 2.Decrease Heapsize to 32m
echo 3.Decrease Heapsize to 24m
read $heap48
case $heap48 in
1)
heap48
;;
2)
heap32
;;
3)
heap24
;;
esac

exit(){
echo Goodbye! And hope you will enjoy openOptimus.
exit
}

hwon(){
setprop debug.sf.hw=1
echo Hardware acceleration enabled.
}

hwoff(){
setprop debug.sf.hw=0
echo Hardware acceleration disabled.
}

sfon(){
setprop media.stagefright.enable-player=true
setprop media.stagefright.enable-meta=true
setprop media.stagefright.enable-scan=true
setprop media.stagefright.enable-http=true
echo Stagefright player enabled.
}

sfoff(){
setprop media.stagefright.enable-player=false
setprop media.stagefright.enable-meta=false
setprop media.stagefright.enable-scan=false
setprop media.stagefright.enable-http=false
echo Stagefright player disabled.
}

megatron(){
cp /sdcard/openOptimus_resources/Megatron/bootanimation.zip /data/local
echo Boot animation copied.
}

particles(){
cp /sdcard/openOptimus_resources/Particles/bootanimation.zip /data/local
echo Boot animation copied.
}

cyan7(){
cp /sdcard/openOptimus_resources/CM7/bootanimation.zip /data/local
echo Boot animation copied.
}

coin(){
cp /sdcard/openOptimus_resources/Coin/bootanimation.zip /data/local
echo Boot animation copied.
}

boot(){
echo *********************************************************
echo * Boot animation changer *
echo *********************************************************
echo Please choose one:
echo 1.Megatron boot animation
echo 2.Android particles
echo 3.CyanogenMod 7
echo 4.Coin
read $megatron
case $megatron in
1)
megatron
;;
2)
particles
;;
3)
cyan7
;;
4)
coin
esac

tx(){
iwconfig wlan0
}

sf(){
echo *********************************************************
echo *Stagefright player enabler/disabler *
echo *********************************************************

echo Please choose an option:
echo 1.Enable Stagefright player
echo 2.Disable stagefright player
read $sfon
case $sfon in
1)
sfon
;;
2)
sfoff
esac

hw(){
echo *********************************************************
echo * Hardware acceleration enabler/disabler *
echo *********************************************************
echo
echo Please choose an option:
echo 1.Enable Hardware acceleration
echo 2.Disable Hardware acceleration

read $hwon
case $sfon in
1)
hwon
;;
2)
hwoff
esac

main_menu(){
echo *********************************************************
echo * Welcome to openOptimus modding script! *
echo *********************************************************

echo Choose an option:
echo 1.Change boot animation
echo 2.Disable/enable Stagefright player
echo 3.Enable/disable Hardware acceleration
echo 4.Check Wi-Fi Tx-Power,run only with Wifi On.
echo 5.Exit
echo 6.Reboot

read $boot
case $boot in
1)
boot
;;
2)
sf
;;
3)
hw
;;
4)
tx
;;
5)
exit
;;
6)
reboot
esac
main_menu

But it gives me syntax error on 206th line. It sez:

Line 206:syntax error:unexpected end of file