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 <steven@stebalien.com>
Steven Allen committed
Nov 1, 2018 at 19:21 UTC
f2d645f922dbf9a2123f34427e714db75bf059b4
1 file changed
+7
-7
bin/maketarball.sh
+7
-7
@@ -5,18 +5,18 @@
5
set -euo pipefail
6
IFS=$'\n\t'
7
8
-
9
-OUTPUT="${1:-go-ipfs-source.tar.gz}"
8
+OUTPUT="$(readlink -f "${1:-go-ipfs-source.tar.gz}")"
9
10
TMPDIR="$(mktemp -d)"
12
-NEWIPFS="$TMPDIR/github.com/ipfs/go-ipfs"
11
+NEWIPFS="$TMPDIR/src/github.com/ipfs/go-ipfs"
12
mkdir -p "$NEWIPFS"
13
cp -r . "$NEWIPFS"
14
( cd "$NEWIPFS" &&
16
- echo $PWD &&
17
- GOPATH="$TMPDIR" gx install --local &&
18
- (git rev-parse --short HEAD || true) > .tarball &&
19
- tar -czf "$OUTPUT" --exclude="./.git" .
15
+ echo $PWD &&
16
+ GOPATH="$TMPDIR" gx install --local &&
17
+ (git rev-parse --short HEAD || true) > .tarball &&
18
+ chmod -R u=rwX,go=rX "$NEWIPFS" # normalize permissions
19
+ tar -czf "$OUTPUT" --exclude="./.git" .
20
)
21
22
rm -rf "$TMPDIR"