提交 f2d645f9 作者: Steven Allen

fix the maketarball script

* don't write the tarball in the directory we're taring (makes tar unhappy)
* fix permissions
* fix gopath

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 1c463819
......@@ -5,18 +5,18 @@
set -euo pipefail
IFS=$'\n\t'
OUTPUT="${1:-go-ipfs-source.tar.gz}"
OUTPUT="$(readlink -f "${1:-go-ipfs-source.tar.gz}")"
TMPDIR="$(mktemp -d)"
NEWIPFS="$TMPDIR/github.com/ipfs/go-ipfs"
NEWIPFS="$TMPDIR/src/github.com/ipfs/go-ipfs"
mkdir -p "$NEWIPFS"
cp -r . "$NEWIPFS"
( cd "$NEWIPFS" &&
echo $PWD &&
GOPATH="$TMPDIR" gx install --local &&
(git rev-parse --short HEAD || true) > .tarball &&
tar -czf "$OUTPUT" --exclude="./.git" .
echo $PWD &&
GOPATH="$TMPDIR" gx install --local &&
(git rev-parse --short HEAD || true) > .tarball &&
chmod -R u=rwX,go=rX "$NEWIPFS" # normalize permissions
tar -czf "$OUTPUT" --exclude="./.git" .
)
rm -rf "$TMPDIR"
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论