From f2d645f922dbf9a2123f34427e714db75bf059b4 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 1 Nov 2018 19:21:50 -0700 Subject: [PATCH] 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: Steven Allen --- bin/maketarball.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/maketarball.sh b/bin/maketarball.sh index 2e3af06a1..63ca4f11a 100755 --- a/bin/maketarball.sh +++ b/bin/maketarball.sh @@ -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"