TIZEN编译安装卸载rpm包
在虚拟机中1编译 ./sdb build工程路径 如:./sdb build jointscreen/daemon_server_demo 脚本中默认工作目录为workspace=${HOME}/tizen
2安装
./sdb install 包名 如:./sdb install com.samsung.js_server-0.1.0-1.armv7l.rpm
脚本中默认rpm路径为 rpmPath=${HOME}/GBS-ROOT/local/repos/SLP/armv7l/RPMS,有的可能在SLPrelease
脚本中默认xml目录为targetXmlPath=/opt/share/packages。有的应用xml路径可能为/usr/share/packages
3卸载
./sdb uninstall 包名 如:./sdb uninstall com.samsung.js_server-0.1.0-1.armv7l.rpm
#!/bin/bash
########Set the follow variables by your environment
workspace=${HOME}/tizen
targetXmlPath=/usr/share/packages
rpmPath=${HOME}/GBS-ROOT/local/repos/SLP/armv7l/RPMS
targetAppPath=/opt/home/app
########
rpmName=$2
soucePath=$2
case $1 in
"install")
if [ ! -n "$2" ] ;then
echo "please input rpm name"
exit
fi
sdb kill-server
sdb shell exit
if [ $? -eq 0 ];then
sdb push "${rpmPath}/${rpmName}" $targetAppPath
if [ $? -eq 0 ];then
sdb shell change-booting-mode.sh --update
sdb shell rpm -i --force "${targetAppPath}/${rpmName}"
if [ $? -eq 0 ];then
#sdb shell pkginfo --rmd ${targetXmlPath}/${rpmName%%-*}.xml
sdb shell pkginfo --imd ${targetXmlPath}/${rpmName%%-*}.xml
if [ $? -eq 0 ];then
echo -e "\033[32m ---Install $rpmName app successfully!--- \033[0m"
else
echo -e "\033[32m ---Install $rpmName app fail!--- \033[0m"
fi
else
echo -e "\033[32m ---Install $rpmName app fail!--- \033[0m"
fi
fi
fi
;;
"uninstall")
if [ ! -n "$2" ] ;then
echo "please input rpm name"
exit
fi
sdb kill-server
sdb shell exit
if [ $? -eq 0 ];then
sdb shell change-booting-mode.sh --update
sdb shell rpm -e ${rpmName%%-*}
if [ $? -eq 0 ];then
echo -e "\033[32m ---Uninstall $rpmName app successfully!--- \033[0m"
else
echo -e "\033[32m ---Uninstall $rpmName app fial!--- \033[0m"
fi
fi
;;
"build")
if [ ! -n "$2" ] ;then
echo "please input source path"
exit
fi
cd ${workspace}/${soucePath%%-*}
if [ $? -eq 0 ];then
sudo gbs build -A armv7l --include-all
fi
;;
*)
echo "invaliad parameter"
exit
;;
esac
页:
[1]