]> git.baikalelectronics.ru Git - kernel.git/commit
scripts: sphinx-pre-install: improve distro detection check
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 16:56:08 +0000 (18:56 +0200)
committerJonathan Corbet <corbet@lwn.net>
Mon, 20 Apr 2020 21:19:12 +0000 (15:19 -0600)
commit1fd3358bfe041aa95c1fdfc7de8a342259b2c968
tree9036cae193b48173cbf4b59fd3f10a26657dab02
parent939e0aba13009773a9b827d091525e8346d2624c
scripts: sphinx-pre-install: improve distro detection check

The Arch-linux detection is hit by catting /etc/issue, whose
contents is (nowadays):

Arch Linux \r (\l)

It sounds a little ackward to print such string, so,
instead, let's use the /etc/os-release file, with exists
on lots of distributions and should provide a more reliable
result.

We'll keep the old tests before it, in order to avoid possible
regressions with the other distros, although the new way should
probably work on all the currently supported distributions.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/472924557afdf2b5492ae2a48c5ecfae216d54e2.1586883286.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/sphinx-pre-install