From 1054826ac49f66d329d3088143f1a7f2b9930dcc Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sun, 28 Jan 2018 14:13:16 -0800 Subject: [PATCH] switch base64 decoder based on OS Less magical. License: MIT Signed-off-by: Steven Allen --- test/ipfs-test-lib.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/ipfs-test-lib.sh b/test/ipfs-test-lib.sh index 6c31c8380..9cd99c2e7 100644 --- a/test/ipfs-test-lib.sh +++ b/test/ipfs-test-lib.sh @@ -111,11 +111,11 @@ test_seq() { } b64decode() { - for flag in "-D" "-d"; do - if base64 "$flag" 2>/dev/null; then - return - fi - done - echo "no compatible base64 command found" >&2 - return 1 + case `uname` in + Linux|FreeBSD) base64 -d ;; + Darwin) base64 -D ;; + *) + echo "no compatible base64 command found" >&2 + return 1 + esac }