403Webshell
Server IP : 104.21.4.30  /  Your IP : 172.71.81.81
Web Server : Apache
System : Linux keen-cori.18-142-40-148.plesk.page 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64
User : simottodesign.com_2tntp341vs7 ( 10011)
PHP Version : 8.3.31
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/nodenv/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/nodenv/nodenv-init
#!/usr/bin/env bash
# Summary: Configure the shell environment for nodenv
# Usage: eval "$(nodenv init - [--no-rehash] [<shell>])"

set -e
[ -n "$NODENV_DEBUG" ] && set -x

# Provide nodenv completions
if [ "$1" = "--complete" ]; then
  echo -
  echo --no-rehash
  echo bash
  echo fish
  echo ksh
  echo zsh
  exit
fi

print=""
no_rehash=""
for args in "$@"
do
  if [ "$args" = "-" ]; then
    print=1
    shift
  fi

  if [ "$args" = "--no-rehash" ]; then
    no_rehash=1
    shift
  fi
done

shell="$1"
if [ -z "$shell" ]; then
  shell="$(ps -p "$PPID" -o 'args=' 2>/dev/null || true)"
  shell="${shell%% *}"
  shell="${shell##-}"
  shell="${shell:-$SHELL}"
  shell="${shell##*/}"
fi

root="${0%/*}/.."

if [ -z "$print" ]; then
  case "$shell" in
  bash )
    if [ -f "${HOME}/.bashrc" ] && [ ! -f "${HOME}/.bash_profile" ]; then
      profile='~/.bashrc'
    else
      profile='~/.bash_profile'
    fi
    ;;
  zsh )
    profile='~/.zshrc'
    ;;
  ksh )
    profile='~/.profile'
    ;;
  fish )
    profile='~/.config/fish/config.fish'
    ;;
  * )
    profile='your profile'
    ;;
  esac

  { echo "# Load nodenv automatically by appending"
    echo "# the following to ${profile}:"
    echo
    case "$shell" in
    fish )
      echo 'status --is-interactive; and source (nodenv init -|psub)'
      ;;
    * )
      echo 'eval "$(nodenv init -)"'
      ;;
    esac
    echo
  } >&2

  exit 1
fi

mkdir -p "${NODENV_ROOT}/"{shims,versions}

case "$shell" in
fish )
  echo "set -gx PATH '${NODENV_ROOT}/shims' \$PATH"
  echo "set -gx NODENV_SHELL $shell"
;;
* )
  echo 'export PATH="'${NODENV_ROOT}'/shims:${PATH}"'
  echo "export NODENV_SHELL=$shell"
;;
esac

completion="${root}/completions/nodenv.${shell}"
if [ -r "$completion" ]; then
  echo "source '$completion'"
fi

if [ -z "$no_rehash" ]; then
  echo 'command nodenv rehash 2>/dev/null'
fi

commands=(`nodenv-commands --sh`)
case "$shell" in
fish )
  cat <<EOS
function nodenv
  set command \$argv[1]
  set -e argv[1]

  switch "\$command"
  case ${commands[*]}
    source (nodenv "sh-\$command" \$argv|psub)
  case '*'
    command nodenv "\$command" \$argv
  end
end
EOS
  ;;
ksh )
  cat <<EOS
function nodenv {
  typeset command
EOS
  ;;
* )
  cat <<EOS
nodenv() {
  local command
EOS
  ;;
esac

if [ "$shell" != "fish" ]; then
IFS="|"
cat <<EOS
  command="\${1:-}"
  if [ "\$#" -gt 0 ]; then
    shift
  fi

  case "\$command" in
  ${commands[*]})
    eval "\$(nodenv "sh-\$command" "\$@")";;
  *)
    command nodenv "\$command" "\$@";;
  esac
}
EOS
fi

Youez - 2016 - github.com/yon3zu
LinuXploit