Skip to content

Commit

Permalink
Write builtin config with ./configure script
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Oct 8, 2011
1 parent bbf5dfc commit ca71fc9
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions configure
@@ -1,10 +1,15 @@
#!/bin/bash #!/bin/bash


# this is a wicked hack, but whatever. # set configurations that will be "sticky" on this system,
# surviving npm self-updates.


CONFIGS=() CONFIGS=()
i=0 i=0


# get the location of this file.
unset CDPATH
CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc

while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
conf="$1" conf="$1"
case $conf in case $conf in
Expand All @@ -23,17 +28,6 @@ while [ $# -gt 0 ]; do
shift shift
done 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 for c in "${CONFIGS[@]}"; do
echo '+node ./bin/npm.js config set "'"$c"'"' echo "$c" >> "$CONFFILE"
node ./bin/npm.js config set "$c"
done done
echo

echo +node ./bin/npm.js config ls
echo
node ./bin/npm.js config ls

0 comments on commit ca71fc9

Please sign in to comment.