summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-01-08 23:45:41 +0100
committerJan Pokorný <jpokorny@redhat.com>2014-01-08 23:46:51 +0100
commit0008f663dab70331ba98e71007ec25fe7e006491 (patch)
tree2be885a2bc6b01525c7807ae5065ce823839b9ed
parent85222ae4f1f028abb02a0c82ae449e3dad0b4861 (diff)
downloaddotfiles-0008f663dab70331ba98e71007ec25fe7e006491.tar.gz
dotfiles-0008f663dab70331ba98e71007ec25fe7e006491.tar.xz
dotfiles-0008f663dab70331ba98e71007ec25fe7e006491.zip
Firstrun scripts: 00-certs-common: add npm cert to npm bundle
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--scripts/firstrun/00-certs-common9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/firstrun/00-certs-common b/scripts/firstrun/00-certs-common
index cd1e754..2c496c9 100644
--- a/scripts/firstrun/00-certs-common
+++ b/scripts/firstrun/00-certs-common
@@ -1,5 +1,7 @@
pushd ../certs >/dev/null
+source ./cert-def
+
# Fedora project authority
# ./cert-import homebundle admin.fedoraproject.org # good to do first?
./cert-import homebundle firefox https://admin.fedoraproject.org/ca/cacert.pem
@@ -15,4 +17,11 @@ pushd ../certs >/dev/null
https://www.digicert.com/CACerts/DigiCertHighAssuranceEVCA-1.crt
./cert-import homebundle -nocrl www.github.com
+# npm (prerequisite: GitHub)
+NPMCA_SRC="https://raw.github.com/isaacs/npm/master/node_modules/npmconf/config-defs.js"
+wget -nv --ca-certificate "${HOMEBUNDLE}" -O - -- "${NPMCA_SRC}" \
+ | sed -n '120,135{s|^\s\+\(\[\s*\)\?\"\([^\"]\+\)\\n\"[+,]|\2|g;p}' \
+ >> "${CA_BUNDLE_NPM}"
+unset NPMCA_SRC
+
popd >/dev/null