Skip to content
This repository
Newer
Older
100755 34 lines (28 sloc) 0.521 kb
e82e6136 »
2011-04-06 Add a config script
1 #!/bin/bash
2
ca71fc95 »
2011-10-07 Write builtin config with ./configure script
3 # set configurations that will be "sticky" on this system,
4 # surviving npm self-updates.
e82e6136 »
2011-04-06 Add a config script
5
6 CONFIGS=()
7 i=0
8
ca71fc95 »
2011-10-07 Write builtin config with ./configure script
9 # get the location of this file.
10 unset CDPATH
11 CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc
12
e82e6136 »
2011-04-06 Add a config script
13 while [ $# -gt 0 ]; do
14 conf="$1"
15 case $conf in
16 --help)
9e218186 »
2011-05-12 misspelled configure
17 echo "./configure --param=value ..."
e82e6136 »
2011-04-06 Add a config script
18 exit 0
19 ;;
20 --*)
21 CONFIGS[$i]="${conf:2}"
22 ;;
23 *)
24 CONFIGS[$i]="$conf"
25 ;;
26 esac
27 let i++
28 shift
29 done
30
31 for c in "${CONFIGS[@]}"; do
ca71fc95 »
2011-10-07 Write builtin config with ./configure script
32 echo "$c" >> "$CONFFILE"
e82e6136 »
2011-04-06 Add a config script
33 done
Something went wrong with that request. Please try again.