@cryptotaxi247 / kubo / commits / 1054826ac

switch base64 decoder based on OS

Less magical. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>

Steven Allen committed Jan 28, 2018 at 14:13 UTC 1054826ac49f66d329d3088143f1a7f2b9930dcc
1 file changed +7 -7
test/ipfs-test-lib.sh
+7 -7
@@ -111,11 +111,11 @@ test_seq() {
111 }
112
113 b64decode() {
114 - for flag in "-D" "-d"; do
115 - if base64 "$flag" 2>/dev/null; then
116 - return
117 - fi
118 - done
119 - echo "no compatible base64 command found" >&2
120 - return 1
114 + case `uname` in
115 + Linux|FreeBSD) base64 -d ;;
116 + Darwin) base64 -D ;;
117 + *)
118 + echo "no compatible base64 command found" >&2
119 + return 1
120 + esac
121 }