From d200ba0c047853303dab036f954d13a6b6c8ffbb Mon Sep 17 00:00:00 2001 From: Himura Kazuto Date: Sat, 12 Oct 2019 15:31:23 +0300 Subject: [PATCH] Switch from /etc/lsb-release to /etc/os-release (#10773) /etc/lsb-release does not exist on Debians --- tools/install-powershell.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/install-powershell.sh b/tools/install-powershell.sh index 0680c1860a..794aaecdbe 100755 --- a/tools/install-powershell.sh +++ b/tools/install-powershell.sh @@ -104,9 +104,9 @@ install(){ REV=$( (sed s/.*release\ // | sed s/\ .*//) < /etc/mandrake-release ) elif [ -f /etc/debian_version ] ; then DistroBasedOn='debian' - DIST=$( (grep '^DISTRIB_ID' | awk -F= '{ print $2 }') < /etc/lsb-release ) - PSUEDONAME=$( (grep '^DISTRIB_CODENAME' | awk -F= '{ print $2 }') < /etc/lsb-release ) - REV=$( (grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }') < /etc/lsb-release) + DIST=$(. /etc/os-release && echo $NAME) + PSUEDONAME=$(. /etc/os-release && echo $VERSION_CODENAME) + REV=$(. /etc/os-release && echo $VERSION_ID) fi if [ -f /etc/UnitedLinux-release ] ; then DIST="${DIST}[$( (tr "\n" ' ' | sed s/VERSION.*//) < /etc/UnitedLinux-release )]"