Skip to content

Commit

Permalink
Added support for macos-specific base64 decoding (-D instead of -d)
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelg committed Dec 5, 2019
1 parent 1d83b56 commit f376d50
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ipfs-wormhole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,15 @@ receive)
# Handle user input
USERINPUT=${2:-}
IPFSHASH=${USERINPUT%%-*}
DSTFILENAME="$(echo "${USERINPUT##*-}" | base64 -d)"
case "$OSTYPE" in
linux-gnu)
BASE64FLAG="-d"
;;
darwin*)
BASE64FLAG="-D"
;;
esac
DSTFILENAME="$(echo "${USERINPUT##*-}" | base64 $BASE64FLAG)"
PASSWORD=${USERINPUT%-*}
PASSWORD=${PASSWORD#*-}

Expand Down

0 comments on commit f376d50

Please sign in to comment.