Rogue Class Linux Download Login

Artifact Content

Artifact 878915ca6277683122ea8c208e5e9066de80439a:


#!/bin/sh
result=$(mktemp)
trap onexit EXIT

onexit()
{
    rm -f $result
}

# Minimum resolution
MINIMUM_RESOLUTION_WIDTH=960
MINIMUM_RESOLUTION_HEIGHT=480

width=$(/usr/sbin/fbset | grep geometry | cut -d ' ' -f 6)
height=$(/usr/sbin/fbset | grep geometry | cut -d ' ' -f 7)
if [ $width -lt $MINIMUM_RESOLUTION_WIDTH -o \
    $height -lt $MINIMUM_RESOLUTION_HEIGHT ]
then
    title="Video error"
    cat >$result <<__EOF__
Letterhunt requires ${MINIMUM_RESOLUTION_WIDTH}x${MINIMUM_RESOLUTION_HEIGHT} video resolution or higher.

The current video resolution is ${width}x${height}.
__EOF__
    dialog --title "$title" --textbox $result 0 0
    exit 0
fi

cd /opt/letterhunt/linux
./letterhunt
exit 0