Quick fix for asn1
This commit is contained in:
parent
c27bfcb800
commit
acee3024a9
2 changed files with 12 additions and 1 deletions
11
fix-asn1.sh
Executable file
11
fix-asn1.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/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
|
||||
echo "[log] node_modules/asn1.js-rfc5280/index.js fixed"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue