Wallet/fix-asn1.sh

11 lines
496 B
Bash
Raw Permalink Normal View History

2018-08-16 17:51:08 +09:00
#!/bin/bash
firstLine=`awk 'NR < 2 {print}' node_modules/asn1.js-rfc5280/index.js`
if [ "$firstLine" = "try {" ]; then
echo "var asn1 = require('asn1.js');" > node_modules/asn1.js-rfc5280/index.new.js
awk 'NR > 6 {print}' node_modules/asn1.js-rfc5280/index.js >> node_modules/asn1.js-rfc5280/index.new.js
rm node_modules/asn1.js-rfc5280/index.js
mv node_modules/asn1.js-rfc5280/index.new.js node_modules/asn1.js-rfc5280/index.js
2018-08-17 16:54:04 +12:00
echo "node_modules/asn1.js-rfc5280/index.js fixed"
2018-08-16 17:51:08 +09:00
fi