#!/bin/sh
#BK dummy for now
#v407 install firmware tarball if not installed.
#100228 BK
#101204 BK changes below, modified firmware tarball.
#110116 rodin.s: i18n
export TEXTDOMAIN=pgprs
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8
eval_gettext () {
  local myMESSAGE=$(gettext "$1")
  eval echo \"$myMESSAGE\"
}
export LANGORG=$LANG

[ "`which pgprs-setup`" != "" ] && exec pgprs-setup

#xmessage "Currently only works with the Multitech GPRS modem.
#If the MT GPRS modem is plugged in, Puppy should have loaded
#the 'firmware tarball' which includes the /usr/bin/mt-gprs-setup
#script. If it isn't there, you get this message."

#install firmware tarball...
cp -f /lib/modules/all-firmware/pgprs.tar.gz /tmp/
cd /tmp
tar -zxf pgprs.tar.gz
cp -a --remove-destination /tmp/pgprs/* /
sync
cd /

#101204...
yaf-splash -bg violet -placement center -timeout 3 -text "$(gettext 'Updating menu, screen will flicker...')"
/usr/sbin/fixmenus
[ "`pidof jwm`" != "" ] && jwm -restart #update the menu.
sleep 1

#/pinstall.pgprs.sh >/dev/null 2>&1 #execute script.
#rm -f /pinstall.pgprs.sh >/dev/null 2>&1

#note, pgprs-setup and pgprs-connect are in the firmware tarball.
exec pgprs-setup
