#!/bin/sh
INSTDIR="$1"  
PLUGINDIR="$INSTDIR/usr/local/share/titan/plugins/lcdpearl1" 

if [ `cat /proc/version | grep stm24 | wc -l` -eq 1 ]; then 
	cd /tmp/stm24 
else 
	cd /tmp/stm23
fi

cp -RP lcdpearl1 "$INSTDIR/usr/local/share/titan/plugins" 
cd /tmp 
rm -rf stm24 
rm -rf stm23

if [ -e /etc/.oebuild ] || [ -e /etc/.ovbuild ];then
	opkg update
	opkg install titan-plugin-tools-lcdpearl1 --dest $1
fi

exit 0
