Heray-Was-Here
Server : Apache
System : Linux vps43555.mylogin.co 3.10.0-1160.53.1.vz7.185.3 #1 SMP Tue Jan 25 12:49:12 MSK 2022 x86_64
User : redsea ( 60651)
PHP Version : 7.4.32
Disable Function : NONE
Directory :  /usr/local/rvm/src/rvm/scripts/functions/detect_systems/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/rvm/src/rvm/scripts/functions/detect_systems/os_release
#!/usr/bin/env bash

__rvm_detect_system_from_os_release()
{
  local __system_name="$( awk -F'=' '$1=="ID"{print $2}' /etc/os-release | head -n 1 | tr '[A-Z]' '[a-z]' | tr -d \" )"

  case $__system_name in
    opensuse*)
      _system_name="OpenSuSE"
      _system_version="$( awk -F'=' '$1=="VERSION_ID"{gsub(/"/,"");print $2}' /etc/os-release | head -n 1 )"
      _system_arch="$( uname -m )"
      ;;

    pclinuxos*)
      _system_name="PCLinuxOS"
      _system_version="$(GREP_OPTIONS="" \command \grep -Eo '[0-9\.]+' /etc/redhat-release  | \command \awk -F. '{print $1}' | head -n 1)"
      _system_arch="$( uname -m )"
      ;;

    debian*)
      _system_name="Debian"
      _system_version="$(awk -F'=' '$1=="VERSION_ID"{gsub(/"/,"");print $2}' /etc/os-release | \command \awk -F. '{print $1}' | head -n 1)"
      _system_arch="$( dpkg --print-architecture )"
      __rvm_detect_debian_major_version_from_codename
      ;;

    *)
      return 1
  esac

  return 0
}

Hry