Script To Distinguish Between Gp2X And Wiz


Mr 2X

Member
Joined
Jun 17, 2006
Messages
443
Website
lostsite.altervista.org
I'm curious about the gpe script that GLBasic apps use to distinguish between GP2X and Wiz.

Here it is:

Code:
#!/bin/sh

if [ -e /sys ]
then
    ./gp2xwiz.prg
else
    ./gp2x.prg
fi

cd /usr/gp2x
./gp2xmenu



What does it mean [ -e /sys ] ?

If I replace .prg files with the correct gpe files of other games/apps, I think it can make a single folder with GP2X and Wiz versions of them.

Is it right ?
 
Mr 2X said:
I'm curious about the gpe script that GLBasic apps use to distinguish between GP2X and Wiz.

Here it is:

Code:
#!/bin/sh

if [ -e /sys ]
then
    ./gp2xwiz.prg
else
    ./gp2x.prg
fi

cd /usr/gp2x
./gp2xmenu



What does it mean [ -e /sys ] ?

If I replace .prg files with the correct gpe files of other games/apps, I think it can make a single folder with GP2X and Wiz versions of them.

Is it right ?

I don't know about the way you described but I did manage to use this script on my Wiz and it does work the way it should. I did not try it on a GP2X F200/F100. You can replace the echo command with the programs you want to run and this might do what you are looking for.

Code:
#!/bin/sh

SYS_TYPE=`uname -a | awk '{print $2}'`
if [ $SYS_TYPE = wiz ]
then
        echo "This is a wiz"
else
        echo "This is not a wiz"
fi

-Kruz
 
Last edited by a moderator:
Back
Top