"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/bin/npm" (8 Mar 2017, 833 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/sh
    2 (set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix
    3 
    4 basedir=`dirname "$0"`
    5 
    6 case `uname` in
    7     *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
    8 esac
    9 
   10 NODE_EXE="$basedir/node.exe"
   11 if ! [ -x "$NODE_EXE" ]; then
   12   NODE_EXE=node
   13 fi
   14 
   15 NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js"
   16 
   17 case `uname` in
   18   *MINGW*)
   19     NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
   20     NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
   21     if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then
   22       NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
   23     fi
   24     ;;
   25   *CYGWIN*)
   26     NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
   27     NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
   28     if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then
   29       NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
   30     fi
   31     ;;
   32 esac
   33 
   34 "$NODE_EXE" "$NPM_CLI_JS" "$@"