Files
GUI/scripts/pack.sh
2021-10-19 14:09:58 +08:00

9 lines
387 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# 发布程序的名称参数1执行脚本时输入
exe=$1
# 修改输出可执行文件路径(当前路径)
destDir=`pwd`
# ldd将所有依赖库生成字符串组(#注意if后的空格只有一个
dependenLibsList=$(ldd $exe | awk '{if (match($3,"/")){ printf("%s "),$3 } }')
# 将字符串组里面的库拷贝到目标文件夹
cp $dependenLibsList $destDir