#!/bin/sh

# Little App Launcher Installation v1.08 (13th september 2011) by Andy Davison
#  Installs the little app launcher, then prods it to make sure it's working.

VERSION="108"
MAJVER=${VERSION%??}
MINVER=${VERSION#$MAJVER}

[ -d /media/logs ] || mkdir /media/logs

echo
echo "Installing the Little App Launcher v1.$MINVER..."
echo

wget -O /media/launcher$VERSION.tgz http://birdslikewires.co.uk/download/joggler/native/launcher/launcher$VERSION.tgz
tar zxf launcher$VERSION.tgz -C /media
echo $VERSION > /media/launcher/version
rm /media/launcher$VERSION.tgz
echo

echo -n "Checking that server will launch on boot..."
/media/launcher/index.cgi >/dev/null
echo " done."

rm /media/launcherInstall.sh 2>/dev/null

echo "Installation of Little App Launcher is complete."
echo
