#!/bin/sh
/mnt/sd/FOLDER/
./APPorGAME.gpe
sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
#!/bin/sh
/mnt/sd/cpu_speed.gpe 1 2 266 0.6
cd /mnt/sd/FOLDER/
./APPorGAME.gpe
sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
#!/bin/sh
/mnt/sd/APPorGAME.gpe
sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
#!/bin/sh
/mnt/sd/cpu_speed 1 2 200 0.6
sync
cd /usr/gp2x/
exec ./gp2xmenu --boot --disable-autorun
Yod4z posted on May 12 2006 at 10:28 AM said:i have just to modify this line?
smbmount //Yod4z/Pc /mnt/ext -o username=administrator,password=pass > mnt/sd/log.txt
smbmount //Yod4z/Pc /mnt/ext -o username=administrator,password=pass 2> mnt/sd/log.txt
smbmount //Yod4z/Pc /mnt/ext -o username=administrator,password=pass &> mnt/sd/log.txt
smbmount //Yod4z/Pc /mnt/ext -o username=administrator,password=pass 1> mnt/sd/log.txt 2> mnt/sd/err.txt
TelcoLou posted on May 10 2006 at 06:48 PM said:Here's one to launch a .gpe located in the root:
Code:#!/bin/sh /mnt/sd/APPorGAME.gpe sync cd /usr/gp2x/ exec /usr/gp2x/gp2xmenu
#!/bin/sh
/mnt/sd/Data/calculator.gpe
sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
#!/bin/sh
/mnt/sd/Data/
./calculator.gpe
sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu
Magnulus posted on Jul 10 2006 at 08:49 AM said:Maybe I'm just lazy, but I'd rather not go through a general Linux scripting tutorial just in order to overclock a few programs and such. I'd rather have; A: A good and specific tutorial that tells you how to make the basic scripts you sometimes need in the Gippex, or B: A list of template scripts that do specific things, with instructions on what to change in order to make it work with what you're making the script for. Preferably both.
# cd /mnt/sd/whatever/wherever/
# ./my_little_script_o_doom.gpe
# sh -x /mnt/sd/whatever/wherever/my_little_script_o_doom.gpe
#!/bin/bash
#
# Example script with debuging output
# <--- This marks a comment by the way: use them!!!
#
# The '>' and '>>' are called re-directs and send the output of a
# command to the file. '>' will always create a new file - even if
# an old one's there already. Use '>>' to append to a file. If you
# want the error output sent to a file use '2>' or '2>>' instead.
#
# With this in mind the 'echo "some text" >> filename' lines
# will add the line 'some text' to your debug file.
#
# To save typing the filename out each time I save it to a variable
# called 'my_file':
my_file=/mnt/sd/script_debug.txt
# To start off we'll log the time and date to our file. A bit lame in the
# GP2X as the clock only starts when the system boots so it won't
# be correct but you can atleast know how soon after turnin on you
# tried your script:
date > $my_file
# OK - first of all we need to change to the location of our app:
cd /mnt/sd/somewhere/
echo "The cd command has been done!" >> $my_file
# Good, now we set the over-clock bits. We also log any error
# output to our file by using '2>>'.
echo "About to overclock..." >> $my_file
/mnt/sd/cpu_speed.gpe 1 2 266 0.6 2>> $my_file
echo "Whoa dude! Feel the speed - overclock done" >> $my_file
# And now we can run out app - this time we log all the output
# to our file by using '&>>' which combines normal output and the
# error output:
echo "Here we go - running MySuperApp.gpe" >> $my_file
./MySuperApp.gpe &>> $my_file
echo "Hope that worked 'cause we're back in our script" >> $my_file
# Now to tidy up in the prescribed manner:
sync
cd /usr/gp2x/
echo "Handing back to the gp2xmenu" >> $my_file
exec /usr/gp2x/gp2xmenu
echo "Bye!" >> $my_file
date >> $my_file
exit 0
:
:
# To save typing the filename out each time I save it to a variable
# called 'my_file':
my_file=/mnt/sd/$(date +%H%M%S)_script_debug.txt
# OK - first of all we need to change to the location of our app:
cd /mnt/sd/somewhere/
:
:
