Skip to content

Commit 9eabfcf

Browse files
author
Nick A
committed
added ctype and rtype
1 parent 4be647a commit 9eabfcf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/tabs/common-script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,13 @@ checkDistro() {
178178
if [ -f /etc/os-release ]; then
179179
. /etc/os-release
180180
DTYPE=$ID
181+
CTYPE=$VERSION_CODENAME
182+
RTYPE=$VERSION_ID
183+
# Use lsb-release if /etc/os-release is missing
184+
elif command_exists lsb_release; then
185+
DTYPE=$(lsb_release -is 2>/dev/null)
186+
CTYPE=$(lsb_release -cs 2>/dev/null)
187+
RTYPE=$(lsb_release -rs 2>/dev/null)
181188
fi
182189
}
183190

0 commit comments

Comments
 (0)