安装脚本
#!/bin/sh
lines=12
temptar=/tmp/qoe.tgz
workpath=/tmp/qoe
tail -n +$lines $0 >${temptar}
tar xzf ${temptar} -C /tmp
rm -rf ${temptar}
cd ${workpath}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/upt/framework/saf/rootfs/usr/lib:/opt/upt/framework/saf/rootfs/lib
./testapp -daemon
exit 0
使用tar命令进行打包合并bin文件:
tar -czvf qoe.tgz qoe/
cat install.sh qoe.tgz > qoe.bin
chmod +x qoe.bin
分离安装文件
sed -n '1,/^exit 0/!p' install.bin > a.tar.gz
分类安装脚本
head -n 273 > install.sh