脚本连接:git
https://github.com/helight/openflow/blob/master/thirdparty/install_thritdparty.shgithub
(1)终端颜色控制,”\033[1;33m”
(2) sleep
(3) tar.gz格式安装; ‘gz’后缀(xzf)和’bz2’(xjf)后缀处理;
(4) du -sh; ls -lht
(5) if [ -d $dir ] -a “$INSTALL_ALL” = “” ]; then #测试目录是否存在 测试
(6) 安装包目录名称package_basename=`basename $package_name .tar.gz`.spa
(7)openssl的特殊处理”./config”, 其余第三方库的”./configure”;ip
(8). 测试安装是否成功: if test $? -ne 0; then, 若安装失败;ssl
(9)默认状况,进行全新安装;openssl
(10)gtest的特殊处理。 解压:unzip -x *.zip; 制做动态库, g++ -I ./include -c src/gtest-all.cc, ar -rv libgtest.a gtest-all.oit
(11) boost特殊安装, 须要执行随包发行的脚本;ast