#! /bin/sh # See if accelemymote is installed ... if [ ! -f /opt/maemo/usr/bin/accelemymote ]; then echo Accelemymote is not installed! exit fi # ... and not running. Start it up if so... if [ ! -f /home/user/.accelemymote/live-trigger ]; then touch /home/user/.accelemymote/live-trigger /opt/maemo/usr/bin/accelemymote & # Enable accelerometer control in config file sed -i 's/\(device=\)\(-2\)/\10/' ~/.mupen64plus/blight_input.conf # Run emu /usr/bin/mupen64plus $1 # Okay, now done so kill accelemymote and reset config file rm /home/user/.accelemymote/live-trigger sed -i 's/\(device=\)\(0\)/\1-2/' ~/.mupen64plus/blight_input.conf else # accelemymote appears to be already running echo Accelemymote appears to be running already. If not, type "rm /home/user/.accelemymote/live-trigger". fi