#!/bin/sh

EXTENSIONDIR=/mnt/us/extensions/gnash
PLUGINSDIR=/tmp/root/.mozilla/plugins

case "$1" in
"0")
	if [ -f ${PLUGINSDIR}/libgnashplugin.so ]; then
        	rm ${PLUGINSDIR}/libgnashplugin.so 
        fi
        ;;
"1")
        if [ ! -d ${PLUGINSDIR} ]; then
        	mkdir -p ${PLUGINSDIR}
        fi
        if [ ! -f ${PLUGINSDIR}/libgnashplugin.so ]; then
        	ln -s ${EXTENSIONDIR}/plugin/libgnashplugin.so ${PLUGINSDIR}
        fi
        ;;
esac
