2011-08-22 00:36:27 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
mypath="$( dirname $0 )"
|
|
|
|
cmd="$mypath/showscene"
|
|
|
|
getnext="$mypath/getval _scene"
|
|
|
|
|
2011-10-02 15:15:32 -04:00
|
|
|
. "$mypath/common"
|
|
|
|
|
2011-08-22 00:36:27 -04:00
|
|
|
scene="$( $getnext )"
|
|
|
|
if [ ! "$scene" ]; then
|
|
|
|
scene='start'
|
|
|
|
fi
|
|
|
|
|
|
|
|
while [ "$scene" ]; do
|
2011-10-02 15:15:32 -04:00
|
|
|
# if rlwrap is found on the system, use it to provide readline capabilities
|
|
|
|
# (which will hopefully prevent ragequits to due re-typing long, mistyped
|
|
|
|
# commands)
|
|
|
|
which rlwrap >/dev/null && {
|
|
|
|
rlwrap -H "$GSGP_PROFILE_PATH/.history" $cmd $scene
|
|
|
|
} || $cmd $scene
|
2011-08-22 00:36:27 -04:00
|
|
|
|
|
|
|
# if the scene stated that we should end, then we should probably end
|
|
|
|
if [ $? -eq 100 ]; then
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
scene="$( $getnext )"
|
|
|
|
done
|
|
|
|
|