You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

21 lines
618 B

#!/bin/bash
# Grab the node root certs. This will be our trusted certs file.
# wget https://raw.githubusercontent.com/joyent/node/master/tools/certdata.txt
wget https://raw.githubusercontent.com/joyent/node/master/src/node_root_certs.h \
|| curl -OJ https://raw.githubusercontent.com/joyent/node/master/src/node_root_certs.h
mv node_root_certs.h lib/browser/Trusted.js
pushd lib/browser &> /dev/null
sed -i '$s/,$//g' Trusted.js
echo "module.exports = ["$'\n'"$(cat Trusted.js)" > Trusted.js
echo "];" >> Trusted.js
sed -i 's/^"/+ "/g' Trusted.js
sed -i 's/^+ "-----B/"-----B/g' Trusted.js
popd &> /dev/null