"Fossies" - the Fresh Open Source Software Archive

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