Skip to content
This repository
tag: v1.1.64
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 34 lines (28 sloc) 0.521 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#!/bin/bash

# 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
    --help)
      echo "./configure --param=value ..."
      exit 0
      ;;
    --*)
      CONFIGS[$i]="${conf:2}"
      ;;
    *)
      CONFIGS[$i]="$conf"
      ;;
  esac
let i++
  shift
done

for c in "${CONFIGS[@]}"; do
echo "$c" >> "$CONFFILE"
done
Something went wrong with that request. Please try again.