1 Star 0 Fork 2

hejuncheng1 / bloaty

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
make-release-tarball.sh 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
# Makes a release tarball. We include our dependencies/submodules,
# but we heavily prune their file lists to avoid including lots of
# extraneous baggage. We also leave out Bloaty's tests, especially
# because some of the test data is large.
set -e
if [ "$#" -ne 1 ]; then
echo "Usage: make-release.tarball.sh VERSION"
exit 1
fi
VERSION=$1
FILES=$(git ls-files --exclude-standard --recurse-submodules |
grep -v googletest |
grep -v ^tests |
grep -v third_party/protobuf |
grep -v 'third_party/capstone/\(suite\|bindings\|xcode\|msvc\|contrib\)' |
grep -v third_party/abseil-cpp/absl/time/internal/cctz/testdata |
grep -v ^.git)
FILES="$FILES $(git ls-files --exclude-standard --recurse-submodules |
grep 'third_party/protobuf/\(src\|cmake\|configure.ac\)')"
# Unfortunately tar on Mac doesn't support --transform, so we have to
# actually move our files to a different directory to get the prefix.
DIR=/tmp/bloaty-$VERSION
rm -rf $DIR
mkdir $DIR
rsync -R $FILES $DIR
BASE=$PWD
cd /tmp
OUT=bloaty-$VERSION.tar.bz2
tar cjf $BASE/$OUT bloaty-$VERSION
echo "Created $OUT"
1
https://gitee.com/hejuncheng1/bloaty.git
git@gitee.com:hejuncheng1/bloaty.git
hejuncheng1
bloaty
bloaty
master

搜索帮助