From daff83788686b2affd146ecae36f7dfaa54add9c Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 19 Dec 2018 10:59:47 -0800 Subject: [PATCH] make: fix building source tarball on macos Unfortunately, `readlink -f` doesn't work on macos. This change *manually* converts a relative path to an absolute path. fixes #5859 License: MIT Signed-off-by: Steven Allen --- bin/maketarball.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/maketarball.sh b/bin/maketarball.sh index 63ca4f11a7e..d5333214505 100755 --- a/bin/maketarball.sh +++ b/bin/maketarball.sh @@ -5,7 +5,11 @@ set -euo pipefail IFS=$'\n\t' -OUTPUT="$(readlink -f "${1:-go-ipfs-source.tar.gz}")" +# readlink doesn't work on macos +OUTPUT="${1:-go-ipfs-source.tar.gz}" +if ! [[ "$OUTPUT" = /* ]]; then + OUTPUT="$PWD/$OUTPUT" +fi TMPDIR="$(mktemp -d)" NEWIPFS="$TMPDIR/src/github.com/ipfs/go-ipfs"