#!/bin/sh
#BK may 2011
setvar PWD = "$(pwd)"
setvar SETDEFAULT = ''no''
if test $PWD = "/"{ #installing in a running puppy.
if test $(cat /root/.packages/woof-installed-packages /root/.packages/user-installed-packages | grep 'gecko\-mediaplayer) = ""{
setvar EXTRAMSG = ""
""
}
export ASKDIALOG="
${EXTRAMSG}
"
setvar RETVAL = "$(gtkdialog3 --program=ASKDIALOG)"
echo $RETVAL
test $(echo $RETVAL | grep 'SetDefault) != "" && setvar SETDEFAULT = ''yes''
}
if test $PWD != "/" -o $SETDEFAULT = "yes"{
echo '#!/bin/sh' > ./usr/local/bin/defaultmediaplayer
echo 'exec gnomemplayershell "$@"' >> ./usr/local/bin/defaultmediaplayer
chmod 755 ./usr/local/bin/defaultmediaplayer
echo '#!/bin/sh' > ./usr/local/bin/defaultvideoplayer
echo 'exec gnomemplayershell "$@"' >> ./usr/local/bin/defaultvideoplayer
chmod 755 ./usr/local/bin/defaultvideoplayer
}