403Webshell
Server IP : 103.175.220.74  /  Your IP : 216.73.216.151
Web Server : nginx/1.18.0
System : Linux p-floo-wj1-db 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : deploy ( 1003)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/deploy/.pyenv/libexec/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/deploy/.pyenv/libexec/pyenv-sh-shell
#!/usr/bin/env bash
#
# Summary: Set or show the shell-specific Python version
#
# Usage: pyenv shell <version>...
#        pyenv shell -
#        pyenv shell --unset
#
# Sets a shell-specific Python version by setting the `PYENV_VERSION'
# environment variable in your shell. This version overrides local
# application-specific versions and the global version.
#
# <version> should be a string matching a Python version known to pyenv.
# The special version string `system' will use your default system Python.
# Run `pyenv versions' for a list of available Python versions.
#
# When `-` is passed instead of the version string, the previously set
# version will be restored. With `--unset`, the `PYENV_VERSION`
# environment variable gets unset, restoring the environment to the
# state before the first `pyenv shell` call.

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

# Provide pyenv completions
if [ "$1" = "--complete" ]; then
  echo --unset
  echo system
  exec pyenv-versions --bare
fi

versions=("$@")
shell="$(basename "${PYENV_SHELL:-$SHELL}")"

if [ -z "$versions" ]; then
  if [ -z "$PYENV_VERSION" ]; then
    echo "pyenv: no shell-specific version configured" >&2
    exit 1
  else
    echo 'echo "$PYENV_VERSION"'
    exit
  fi
fi

if [ "$versions" = "--unset" ]; then
  case "$shell" in
  fish )
    echo 'set -gu PYENV_VERSION_OLD "$PYENV_VERSION"'
    echo "set -e PYENV_VERSION"
    ;;
  pwsh )
    echo '$Env:PYENV_VERSION, $Env:PYENV_VERSION_OLD = $null, $Env:PYENV_VERSION'
    ;;
  * )
    echo 'PYENV_VERSION_OLD="${PYENV_VERSION-}"'
    echo "unset PYENV_VERSION"
    ;;
  esac
  exit
fi

if [ "$versions" = "-" ]; then
  case "$shell" in
  fish )
    cat <<EOS
if set -q PYENV_VERSION_OLD
  if [ -n "\$PYENV_VERSION_OLD" ]
    set PYENV_VERSION_OLD_ "\$PYENV_VERSION"
    set -gx PYENV_VERSION "\$PYENV_VERSION_OLD"
    set -gu PYENV_VERSION_OLD "\$PYENV_VERSION_OLD_"
    set -e PYENV_VERSION_OLD_
  else
    set -gu PYENV_VERSION_OLD "\$PYENV_VERSION"
    set -e PYENV_VERSION
  end
else
  echo "pyenv: PYENV_VERSION_OLD is not set" >&2
  false
end
EOS
    ;;
  pwsh )
    cat <<EOS
if ( Get-Item -Path Env:\PYENV_VERSION* ) {
  \$Env:PYENV_VERSION, \$Env:PYENV_VERSION_OLD = \$Env:PYENV_VERSION_OLD, \$Env:PYENV_VERSION
} else {
  Write-Error "pyenv: Env:PYENV_VERSION_OLD is not set"
  return \$false
} 
EOS
    ;;
  * )
    cat <<EOS
if [ -n "\${PYENV_VERSION_OLD+x}" ]; then
  if [ -n "\$PYENV_VERSION_OLD" ]; then
    PYENV_VERSION_OLD_="\$PYENV_VERSION"
    export PYENV_VERSION="\$PYENV_VERSION_OLD"
    PYENV_VERSION_OLD="\$PYENV_VERSION_OLD_"
    unset PYENV_VERSION_OLD_
  else
    PYENV_VERSION_OLD="\$PYENV_VERSION"
    unset PYENV_VERSION
  fi
else
  echo "pyenv: PYENV_VERSION_OLD is not set" >&2
  false
fi
EOS
    ;;
  esac
  exit
fi

# Make sure the specified version is installed.
if pyenv-prefix "${versions[@]}" >/dev/null; then
  OLDIFS="$IFS"
  IFS=: version="${versions[*]}"
  IFS="$OLDIFS"
  if [ "$version" != "$PYENV_VERSION" ]; then
    case "$shell" in
    fish )
      echo 'set -gu PYENV_VERSION_OLD "$PYENV_VERSION"'
      echo "set -gx PYENV_VERSION \"$version\""
      ;;
    pwsh )
      echo '$Env:PYENV_VERSION, $Env:PYENV_VERSION_OLD = "'"${version}"'", $Env:PYENV_VERSION'
      ;;
    * )
      echo 'PYENV_VERSION_OLD="${PYENV_VERSION-}"'
      echo "export PYENV_VERSION=\"${version}\""
      ;;
    esac
  fi
else
  echo "false"
  exit 1
fi

Youez - 2016 - github.com/yon3zu
LinuXploit