压缩脚本伪代码参考
target=xxx-patch.sh tar -czf ../install.tgz * echo -e "nPAYLOAD:" >> $target cat ../install.tgz >> $target rm -rf ../install.tgz
解压脚本 xxx-patch.sh
echo "start install patch!" payload_offset=$(($(grep -na -m1 "^PAYLOAD:$" $0|cut -d':' -f1) + 1)) tail -n +$payload_offset $0 | tar zx -C / > /dev/null 2>&1 # xxxxx # your code here # xxxxx
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)