#!/bin/sh
progdir=$(dirname "$0")/gmu
cd $progdir
HOME=$progdir
cp /sys/class/backlight/backlight.2/brightness /tmp/brighntess.txt
LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$progdir/libs.rg35xx" \
SDL_NOMOUSE=1 ./gmu.bin -c gmu.rg35xx.conf &> log.txt
cat /tmp/brighntess.txt > /sys/class/backlight/backlight.2/brightness
rm /tmp/brighntess.txt
sync
