"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/configure" (8 Mar 2017, 521 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 # set configurations that will be "sticky" on this system,
    4 # surviving npm self-updates.
    5 
    6 CONFIGS=()
    7 i=0
    8 
    9 # get the location of this file.
   10 unset CDPATH
   11 CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc
   12 
   13 while [ $# -gt 0 ]; do
   14   conf="$1"
   15   case $conf in
   16     --help)
   17       echo "./configure --param=value ..."
   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
   32   echo "$c" >> "$CONFFILE"
   33 done