| 123456789101112131415161718192021222324252627282930313233 | #!/usr/bin/env bash# set configurations that will be "sticky" on this system,# surviving npm self-updates.CONFIGS=()i=0# get the location of this file.unset CDPATHCONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrcwhile [ $# -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++  shiftdonefor c in "${CONFIGS[@]}"; do  echo "$c" >> "$CONFFILE"done
 |