#!/bin/bash

apppath="/opt/kingsoft/wps-office/office6"
if [ $1 != "ksowebstartupwps://" ] && [ $1 != "ksowebstartupet://" ] && [ $1 != "ksowebstartupwpp://" ];then
	mimetype=${1%%://*}
	echo "mimetype="$mimetype
	exetype=${mimetype#*startup}
	echo "exetype="$exetype
	if [ $exetype != "wps" ] && [ $exetype != "et" ] && [ $exetype != "wpp" ];then
		eval "notify-send 'exectable type is invalid args is ${exetype}'"
	else
		echo "exepath=${apppath}/${exetype} '$1'"
		eval "${apppath}/${exetype} '$1'"	
	fi
else
	eval "notify-send 'Argv is invalid'"
fi
