1 Star 9 Fork 3

zettadb/ kunlun-storage-081809

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
post-install.sh 1.96 KB
一键复制 编辑 原始数据 按行查看 历史
if [ $# -ne 2 ]
then
echo "usage: ./post-install.sh <installation-dir-full-path> <build-type>"
exit 0;
fi
#copy doc
cp -f INSTALL.kunlun.md $1
srcroot=`pwd`
#create needed dirs in binary dir
cd $1
mkdir -p dba_tools share_lib .run_so etc
cd $1/bin
#make sure the built binaries have exe modes.
ls |while read f ; do chmod 0755 $f ; done
#copy stuff to binary
cd $srcroot/dba_tools
cp -f libjemalloc.so.3.6.0 $1/.run_so
cp -f libjemalloc.so.3.6.0 $1/share_lib
# these files must also exist in dba_tools/ dir
cp -f bootmysql.sh imysql.sh mgr_config.json seq_reserve_vals.sql stopmysql.sh template-small.cnf $1/dba_tools
cp -f install-mysql.py monitormysql.sh startmysql.sh template.cnf $1/dba_tools
cp -f add_shards.py bootstrap.py common.py create_cluster.py meta_inuse.sql $1/dba_tools
cp -f sys_db_table.sql $1/dba_tools
#make sure all scripts are executable
cd $1/dba_tools
ls *.sh |while read f ; do chmod -R 0755 $f ; done
rm -fr $1/mysql-test
mkdir -p $1/resources
cp -f $srcroot/resources/mysql-connector-python-2.1.3.tar.gz $1/resources
cd $1/lib
mkdir -p deps
#copy all dependent dynamic lib files into lib/deps
cd $1/bin
ls | while read f; do
if test -L "$f"; then
relpath="`readlink $f`"
test -f "$relpath" && rm -f "$f" && cp -f "$relpath" $f && rm -f "$relpath"
fi
done
cd $1/lib
ls | while read f; do
if test -L "$f"; then
relpath="`readlink $f`"
test -e "$relpath" || rm -f "$f"
fi
done
cd $1/bin
export LD_LIBRARY_PATH="$1/lib:$LD_LIBRARY_PATH"
rm -f ./prog-deps.txt
ls | xargs ldd >> ./prog-deps.txt 2>/dev/null
cat ./prog-deps.txt | sed -n '/^.* => .*$/p' | sed 's/^.* => \(.*\)(.*$/\1/g' | sort | uniq | sed /^.*percona.*$/d | sed '/^ *$/d' | while read f ; do
echo "install $f to lib/deps"
cp -f $f $1/lib/deps
done
rm ./prog-deps.txt
# strip binaries if necessary
# echo "build-type: $2"
if test "$2" = "Release"; then
cd $1
strip -gs bin/* 2>/dev/null
strip -gs lib/* 2>/dev/null
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zettadb/kunlun-storage-081809.git
git@gitee.com:zettadb/kunlun-storage-081809.git
zettadb
kunlun-storage-081809
kunlun-storage-081809
master

搜索帮助