Debian Codegraph @

libexec/pyenv---version

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 # Summary: Display the version of pyenv
3 #
4 # Displays the version number of this pyenv release, including the
5 # current revision from git, if available.
6 #
7 # The format of the git revision is:
8 # <version>-<num_commits>-<git_sha>
9 # where `num_commits` is the number of commits since `version` was
10 # tagged.
11
12 set -e
13 [scip-shell system . . `[`. -n "$PYENV_DEBUG" ] && set -x
14
15 version="2.7.1"
16 git_revision=""
17
18 if cd "${BASH_SOURCE%/*}" 2>/dev/nullscip-shell filesystem . . `/dev/null`. && gitscip-shell system . . git. remote -v 2>/dev/nullscip-shell filesystem . . `/dev/null`. | grepscip-shell system . . grep. -q pyenv; then
19 git_revision="$(gitscip-shell system . . git. describe --tags HEAD 2>/dev/nullscip-shell filesystem . . `/dev/null`. || truescip-shell system . . true.)"
20 git_revision="${git_revision#v}"
21 fi
22
23 echoscip-shell system . . echo. "pyenv ${git_revision:-$version}"