compound_statement
{ "{"
comment "# this ensures the entire script is downloaded #"
variable_assignment
variable_name "NVM_SCRIPT_SOURCE"
= "="
string
" "\""
simple_expansion
$ "$"
special_variable_name "_"
" "\""
function_definition
word "nvm_is_zsh"
( "("
) ")"
compound_statement
{ "{"
test_command
[ "["
unary_expression
test_operator "-n"
string
" "\""
expansion
${ "${"
variable_name "ZSH_VERSION"
- "-"
} "}"
" "\""
] "]"
} "}"
function_definition (+23 nodes collapsed)
function_definition
word "nvm_cd"
( "("
) ")"
compound_statement
{ "{"
comment "# shellcheck disable=SC1001,SC2164"
command
command_name
word "\\cd"
string
" "\""
simple_expansion
$ "$"
special_variable_name "@"
" "\""
} "}"
function_definition
word "nvm_err"
( "("
) ")"
compound_statement
{ "{"
command
file_redirect
>& ">&"
number "2"
command_name
word "nvm_echo"
string
" "\""
simple_expansion
$ "$"
special_variable_name "@"
" "\""
} "}"
function_definition (+21 nodes collapsed)
function_definition (+26 nodes collapsed)
function_definition (+33 nodes collapsed)
function_definition (+28 nodes collapsed)
function_definition (+316 nodes collapsed)
function_definition (+57 nodes collapsed)
function_definition (+34 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+159 nodes collapsed)
function_definition (+112 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+49 nodes collapsed)
function_definition (+40 nodes collapsed)
function_definition (+780 nodes collapsed)
comment "# Make zsh glob matching behave same as bash"
comment "# This fixes the \"zsh: no matches found\" errors"
if_statement (+24 nodes collapsed)
if_statement
if "if"
command
command_name
word "nvm_is_zsh"
; ";"
then "then"
variable_assignment
variable_name "NVM_CD_FLAGS"
= "="
string
" "\""
string_content "-q"
" "\""
fi "fi"
comment "# Auto detect the NVM_DIR when not set"
if_statement (+145 nodes collapsed)
redirected_statement
unset_command
unset "unset"
variable_name "NVM_SCRIPT_SOURCE"
file_redirect
file_descriptor "2"
> ">"
word "/dev/null"
function_definition (+221 nodes collapsed)
comment "# Traverse up in directory tree to find containing folder"
function_definition (+82 nodes collapsed)
function_definition (+52 nodes collapsed)
comment "# Obtain nvm version from rc file"
function_definition (+145 nodes collapsed)
function_definition (+24 nodes collapsed)
function_definition (+24 nodes collapsed)
function_definition (+30 nodes collapsed)
function_definition (+30 nodes collapsed)
function_definition (+140 nodes collapsed)
function_definition (+21 nodes collapsed)
function_definition (+140 nodes collapsed)
function_definition (+242 nodes collapsed)
comment "# Expand a version using the version cache"
function_definition (+214 nodes collapsed)
function_definition (+244 nodes collapsed)
function_definition (+493 nodes collapsed)
function_definition (+108 nodes collapsed)
function_definition (+21 nodes collapsed)
function_definition (+76 nodes collapsed)
function_definition (+103 nodes collapsed)
function_definition (+125 nodes collapsed)
function_definition (+146 nodes collapsed)
function_definition (+317 nodes collapsed)
function_definition (+29 nodes collapsed)
function_definition (+515 nodes collapsed)
function_definition (+192 nodes collapsed)
function_definition (+118 nodes collapsed)
function_definition (+124 nodes collapsed)
function_definition (+493 nodes collapsed)
function_definition (+104 nodes collapsed)
function_definition (+167 nodes collapsed)
function_definition (+414 nodes collapsed)
function_definition (+125 nodes collapsed)
function_definition
word "nvm_iojs_prefix"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "nvm_echo"
raw_string "'iojs'"
} "}"
function_definition
word "nvm_node_prefix"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "nvm_echo"
raw_string "'node'"
} "}"
function_definition (+31 nodes collapsed)
function_definition (+43 nodes collapsed)
function_definition (+64 nodes collapsed)
function_definition (+1195 nodes collapsed)
function_definition (+218 nodes collapsed)
function_definition (+31 nodes collapsed)
comment "# args flavor, type, version"
function_definition (+587 nodes collapsed)
function_definition (+157 nodes collapsed)
function_definition (+370 nodes collapsed)
function_definition (+218 nodes collapsed)
comment "# args: flavor, type, version, slug, compression"
function_definition (+192 nodes collapsed)
function_definition (+485 nodes collapsed)
function_definition (+497 nodes collapsed)
function_definition (+103 nodes collapsed)
function_definition (+704 nodes collapsed)
function_definition (+89 nodes collapsed)
function_definition (+220 nodes collapsed)
function_definition (+180 nodes collapsed)
function_definition (+118 nodes collapsed)
function_definition
word "nvm_is_merged_node_version"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "nvm_version_greater_than_or_equal_to"
string
" "\""
simple_expansion
$ "$"
variable_name "1"
" "\""
word "v4.0.0"
} "}"
function_definition (+67 nodes collapsed)
comment "# args: flavor, type, version, reinstall"
function_definition
word "nvm_install_binary"
( "("
) ")"
compound_statement
{ "{"
declaration_command
local "local"
variable_name "FLAVOR"
case_statement (+40 nodes collapsed)
declaration_command
local "local"
variable_name "TYPE"
variable_assignment
variable_name "TYPE"
= "="
string
" "\""
expansion
${ "${"
variable_name "2"
- "-"
} "}"
" "\""
declaration_command
local "local"
variable_name "PREFIXED_VERSION"
variable_assignment
variable_name "PREFIXED_VERSION"
= "="
string
" "\""
expansion
${ "${"
variable_name "3"
- "-"
} "}"
" "\""
if_statement (+25 nodes collapsed)
declaration_command
local "local"
variable_name "VERSION"
variable_assignment
variable_name "VERSION"
= "="
string
" "\""
command_substitution
$( "$("
command
command_name
word "nvm_strip_iojs_prefix"
string
" "\""
expansion
${ "${"
variable_name "PREFIXED_VERSION"
} "}"
" "\""
) ")"
" "\""
if_statement (+23 nodes collapsed)
declaration_command
local "local"
variable_name "tar_compression_flag"
variable_assignment
variable_name "tar_compression_flag"
= "="
raw_string "'z'"
if_statement
if "if"
command
command_name
word "nvm_supports_xz"
string
" "\""
expansion
${ "${"
variable_name "VERSION"
} "}"
" "\""
; ";"
then "then"
variable_assignment
variable_name "tar_compression_flag"
= "="
raw_string "'J'"
fi "fi"
declaration_command
local "local"
variable_name "TARBALL"
declaration_command
local "local"
variable_name "TMPDIR"
declaration_command
local "local"
variable_name "VERSION_PATH"
declaration_command
local "local"
variable_name "PROGRESS_BAR"
declaration_command
local "local"
variable_name "NODE_OR_IOJS"
if_statement
if "if"
test_command
[ "["
binary_expression
string
" "\""
expansion
${ "${"
variable_name "FLAVOR"
} "}"
" "\""
= "="
raw_string "'node'"
] "]"
; ";"
then "then"
variable_assignment
variable_name "NODE_OR_IOJS"
= "="
string
" "\""
expansion
${ "${"
variable_name "FLAVOR"
} "}"
" "\""
fi "fi"
if_statement (+39 nodes collapsed)
command
command_name
word "nvm_echo"
string
" "\""
string_content "Downloading and installing "
expansion
${ "${"
variable_name "NODE_OR_IOJS"
- "-"
} "}"
expansion
${ " ${"
variable_name "VERSION"
} "}"
string_content "..."
" "\""
variable_assignment (+52 nodes collapsed)
if_statement (+37 nodes collapsed)
declaration_command
local "local"
variable_name "tar"
variable_assignment
variable_name "tar"
= "="
raw_string "'tar'"
if_statement (+22 nodes collapsed)
if_statement (+147 nodes collapsed)
command
command_name
word "nvm_err"
raw_string "'Binary download failed, trying source.'"
if_statement (+30 nodes collapsed)
command
command_name
word "return"
number "1"
} "}"
comment "# args: flavor, kind, version"
function_definition (+269 nodes collapsed)
comment "# args: flavor, kind, type, version"
function_definition (+862 nodes collapsed)
function_definition (+299 nodes collapsed)
comment "# args: flavor, type, version, make jobs, additional"
function_definition (+883 nodes collapsed)
function_definition (+49 nodes collapsed)
function_definition (+141 nodes collapsed)
function_definition (+91 nodes collapsed)
function_definition (+146 nodes collapsed)
function_definition (+438 nodes collapsed)
comment "# Succeeds if $IOJS_VERSION represents an io.js version that"...
comment "# Solaris binary, fails otherwise."
comment "# Currently, only io.js 3.3.1 has a Solaris binary available"...
comment "# latest io.js version available. The expectation is that an"...
comment "# version later than v3.3.1 will also have Solaris binaries."
function_definition (+82 nodes collapsed)
comment "# Succeeds if $NODE_VERSION represents a node version that h"...
comment "# Solaris binary, fails otherwise."
comment "# Currently, node versions starting from v0.8.6 have a Solar"...
comment "# available."
function_definition (+101 nodes collapsed)
comment "# Succeeds if $VERSION represents a version (node, io.js or "...
comment "# Solaris binary, fails otherwise."
function_definition (+71 nodes collapsed)
function_definition (+153 nodes collapsed)
function_definition (+81 nodes collapsed)
comment "# Check version dir permissions"
function_definition (+161 nodes collapsed)
function_definition
word "nvm_cache_dir"
( "("
) ")"
compound_statement
{ "{"
command
command_name
word "nvm_echo"
string
" "\""
expansion
${ "${"
variable_name "NVM_DIR"
} "}"
string_content "/.cache"
" "\""
} "}"
function_definition (+9208 nodes collapsed)
function_definition (+56 nodes collapsed)
function_definition (+40 nodes collapsed)
function_definition (+215 nodes collapsed)
function_definition (+312 nodes collapsed)
function_definition (+76 nodes collapsed)
command
command_name
word "nvm_process_parameters"
string
" "\""
simple_expansion
$ "$"
special_variable_name "@"
" "\""
} "}"