You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
447 B

пре 11 година
  1. #!/usr/bin/env bash
  2. # Usage: rbenv version-file-write <file> <version>
  3. set -e
  4. [ -n "$RBENV_DEBUG" ] && set -x
  5. RBENV_VERSION_FILE="$1"
  6. RBENV_VERSION="$2"
  7. if [ -z "$RBENV_VERSION" ] || [ -z "$RBENV_VERSION_FILE" ]; then
  8. rbenv-help --usage version-file-write >&2
  9. exit 1
  10. fi
  11. # Make sure the specified version is installed.
  12. rbenv-prefix "$RBENV_VERSION" >/dev/null
  13. # Write the version out to disk.
  14. echo "$RBENV_VERSION" > "$RBENV_VERSION_FILE"