Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/thread-self/root/usr/local/rvm/scripts/functions/detect/system_name/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/usr/local/rvm/scripts/functions/detect/system_name/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
    amzn*)
      _system_name="Amazon"
      _system_version="$( awk -F'=' '$1=="VERSION_ID"{gsub(/"/,"");print $2}' /etc/os-release | head -n 1 )"
      _system_arch="$( uname -m )"
      ;;

    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 )"
      ;;

    void*)
      _system_name="Void"
      _system_version="$(\command \lsb_release -a | \command awk -F: '/Release/{gsub(" |\t",""); print $2}')"
      _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 )"

      if
        [ -z "$_system_version" ]
      then
        _system_version="$(\command \cat /etc/debian_version | \command \awk -F. '{print $1}' | head -n 1)"
      fi

      __rvm_detect_debian_major_version_from_codename
      ;;

    *)
      return 1
  esac

  return 0
}

Hry