"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/bin/apm" (11 Apr 2017, 674 Bytes) of package /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 -e
    4 
    5 initialCwd=`pwd -P`
    6 
    7 apmPath=$0
    8 builtin cd "`dirname "$apmPath"`"
    9 binDir=`basename "$apmPath"`
   10 
   11 # Detect node binary name
   12 osName=`uname -s`
   13 if [ "${osName:0:10}" == 'MINGW32_NT' ]; then
   14   nodeBin="node.exe"
   15 else
   16   nodeBin="node"
   17 fi
   18 
   19 while [ -L "$binDir" ]
   20 do
   21   binDir=`readlink "$binDir"`
   22   builtin cd "`dirname "$binDir"`"
   23   binDir=`basename "$binDir"`
   24 done
   25 
   26 binDir=`pwd -P`
   27 
   28 maybe_node_gyp_path="$binDir"/../node_modules/.bin/node-gyp
   29 if [ -e "$maybe_node_gyp_path" ]
   30 then
   31   export npm_config_node_gyp="$maybe_node_gyp_path"
   32 fi
   33 
   34 export PYTHON="${binDir}/python-interceptor.sh"
   35 
   36 builtin cd "$initialCwd"
   37 "$binDir/$nodeBin" "$binDir/../lib/cli.js" "$@"