"Fossies" - the Fresh Open Source Software Archive

Member "node-v12.18.4-win-x64/node_modules/npm/bin/npm" (14 Feb 2020, 930 Bytes) of package /windows/www/node-v12.18.4-win-x64.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="$basedir/node"
   13 fi
   14 if ! [ -x "$NODE_EXE" ]; then
   15   NODE_EXE=node
   16 fi
   17 
   18 NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js"
   19 
   20 case `uname` in
   21   *MINGW*)
   22     NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
   23     NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
   24     if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then
   25       NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
   26     fi
   27     ;;
   28   *CYGWIN*)
   29     NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
   30     NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
   31     if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then
   32       NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
   33     fi
   34     ;;
   35 esac
   36 
   37 "$NODE_EXE" "$NPM_CLI_JS" "$@"