mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 18:13:54 +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:
@ -111,11 +111,11 @@ test_seq() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b64decode() {
|
b64decode() {
|
||||||
for flag in "-D" "-d"; do
|
case `uname` in
|
||||||
if base64 "$flag" 2>/dev/null; then
|
Linux|FreeBSD) base64 -d ;;
|
||||||
return
|
Darwin) base64 -D ;;
|
||||||
fi
|
*)
|
||||||
done
|
echo "no compatible base64 command found" >&2
|
||||||
echo "no compatible base64 command found" >&2
|
return 1
|
||||||
return 1
|
esac
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user