Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-10-08 04:18:28 +0400
committerisaacs <i@izs.me>2011-10-08 04:18:28 +0400
commitca71fc956dd589511d5258d3906a01edcd68555c (patch)
tree8f4c7adf0d5093bc3e68a9a78857480f6b4eccf6 /configure
parentbbf5dfc63f68d1d7d3dfed3cbeb62c2b30126264 (diff)
Write builtin config with ./configure script
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 7 insertions, 13 deletions
diff --git a/configure b/configure
index 62036c651..b13c8d0d7 100755
--- a/configure
+++ b/configure
@@ -1,10 +1,15 @@
#!/bin/bash
-# this is a wicked hack, but whatever.
+# set configurations that will be "sticky" on this system,
+# surviving npm self-updates.
CONFIGS=()
i=0
+# get the location of this file.
+unset CDPATH
+CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc
+
while [ $# -gt 0 ]; do
conf="$1"
case $conf in
@@ -23,17 +28,6 @@ while [ $# -gt 0 ]; do
shift
done
-# Pull in submodules, since npm can't work without them.
-if [ -d .git ]; then
- git submodule update --init --recursive
-fi
-
for c in "${CONFIGS[@]}"; do
- echo '+node ./bin/npm.js config set "'"$c"'"'
- node ./bin/npm.js config set "$c"
+ echo "$c" >> "$CONFFILE"
done
-echo
-
-echo +node ./bin/npm.js config ls
-echo
-node ./bin/npm.js config ls