-
Notifications
You must be signed in to change notification settings - Fork 2
dev_functions_2ObtainingInfo.
Xmetalfanx edited this page Mar 31, 2023
·
2 revisions
- lsbReleaseInfo function called
- osreleaseInfo function called
- Gets information first from lsb, lsbReleaseInfo is the function
-
lsbDescription:
$(lsb_release -sd )
- Seems like a "Full name"
- examples:
- Linux Mint 19.1 Tessa
-
lsbRelease:
$(lsb_release -sr)
- examples
- 19.1 (for Mint 19.1 Tessa)
-
lsbCodename:
$(lsb_release -sc)
- Codename on Ubuntu
- examples:
- tessa (for Linux Mint 19.1)
-
lsbDistribID:
$(lsb_release -si)
- examples:
- LinuxMint
- Gets more info based on /etc/os-release, osreleaseInfo is the function
-
OSRELEASE_NAME:
- code:
$(awk -F= '/^NAME=/ { print $2 }' /etc/os-release | tr -d \")
- examples:
- "Manjaro Linux",
- Fedora
- (with double quotes) "Linux Mint"
- code:
-
*OSRELEASE_IDLIKE_:
-
code:
$(awk -F= '/^ID_LIKE=/ { print $2 }' /etc/os-release | tr -d \" )
-
examples:
-
debian (for ubuntu)
-
ubuntu (for Linux Mint )
-
OSRELEASE_ID
- code:
$(awk -F= '/^ID=/ { print $2 }' /etc/os-release | tr -d \")
- examples:
- fedora
- linuxmint
- code:
-
-
OSRELEASE_VERSIONID:
- code;
$(awk -F= '/^VERSION_ID=/ { print $2 }' /etc/os-release | tr -d \")
- examples:
- 36 # (Fedora)
- 20.04 # (Ubuntu)
- "19.2" (Mint .. includes double quotes)
- examples:
- code;
-
OSRELEASE_VERSION
- code:
$(awk -F= '/^VERSION=/ { print $2 }' /etc/os-release | tr -d \")
- example:
- "19.2 (Tina)" (with DQs for Linux Mint)
- code:
-
Ubuntu specific check
- OSRELEASE_UBUNTU_CODENAME:
- code:
$(grep "^UBUNTU_CODENAME=" /etc/os-release | cut -d '=' -f 2 | sed 's/\"//g' )
- example:
- focal
- jammy
- Script Menus
- Software Menu
- Xmetal's Bulk Tasks
- Dev Documentation
- Distros
- Cleanup Menu
- Software Menus