Author Topic: How to use the 'dialog' command in a shell script  (Read 1577 times)

Meneer Jansen (OP)

  • Posts: 511
How to use the 'dialog' command in a shell script
« on: January 09, 2011, 05:12:49 pm »
I'm trying to write a (Linux) shell script to choose one of three way's to start the game PoP2. If I execute the script on my Dingoo via a telnet session it works, but when I do it on the actual dingoo (in dingux) it shows nothing on the command line. I can make the choice however via the up/down D-pad buttons and by pressing 'start' for Enter.

This is the script:
Code: [Select]
#!/bin/sh
/usr/bin/dialog --menu "Choose the way in which you wanna play PoP2:"\
11 50 3\
"1" "Enable level skip"\
"2" "Enable savegame loading 1"\
"3" "Enable savegame loading 2"\
2>/tmp/choice
choice="`cat /tmp/choice`"
case $choice in
1) ./pop2.sh ;;
2) ./pop2-save1 ;;
3) ./pop2-save2 ;;
esac
exit

Why doesn't it work in Dingux?
« Last Edit: January 09, 2011, 05:21:18 pm by Meneer Jansen »
Finally got me a new Dingoo after I Kentucky ~~::fried::~~ the other one. Yippee! [edit] And lost it!

 

Post a new topic