shell-脚本安装第三方库

脚本链接:

https://github.com/helight/openflow/blob/master/thirdparty/install_thritdparty.sh

(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`.

(7)openssl的特殊处理”./config”, 其他第三方库的”./configure”;

(8). 测试安装是否成功: if test $? -ne 0; then, 若安装失败;

(9)默认情况,进行全新安装;

(10)gtest的特殊处理。 解压:unzip -x *.zip; 制作动态库, g++ -I ./include -c src/gtest-all.cc, ar -rv libgtest.a gtest-all.o

(11) boost特殊安装, 需要执行随包发行的脚本;

你可能感兴趣的:(shell-脚本安装第三方库)