Created
July 19, 2017 20:30
-
-
Save robstradling/14c1a396495b38a5cbd076d679054ce2 to your computer and use it in GitHub Desktop.
Generate add-chain JSON (assume no chain is needed)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "{\"chain\":[\"" | |
INPUT_FILE=`mktemp` | |
echo $1 | sed "s/^/openssl base64 -d -in /g" | sed "s/$/ | base64 -w0/g" > $INPUT_FILE | |
chmod 755 $INPUT_FILE | |
$INPUT_FILE | |
rm $INPUT_FILE | |
echo "\"]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment