1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 01:52:26 +08:00

switch base64 decoder based on OS

Less magical.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen
2018-01-28 14:13:16 -08:00
parent faae63fcf1
commit 1054826ac4

View File

@ -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
}