]> git.ipfire.org Git - thirdparty/grub.git/commit
autogen.sh: Detect python
authorPetr Vorel <pvorel@suse.cz>
Mon, 30 Aug 2021 09:53:17 +0000 (11:53 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 6 Sep 2021 15:00:53 +0000 (17:00 +0200)
commit8f35208db4154ede690a18e408375815bbf320b7
tree8672da732978dede3c0bc3c04673d2ed3c5fb4d8
parentebed73d509c6433507b57c3b1d9486904f925c0f
autogen.sh: Detect python

It helps to avoid an error on distros which has only python3 binary:
  ./autogen.sh: line 20: python: command not found

Use python3 as the default as python2 is EOL since Jan 2020. However,
check also for python which is on most distros, if not all, python2
because code still works on python2.

Although it should not be needed keep the possibility to define PYTHON
variable.

For detection use "command -v" which is POSIX and supported on all
common shells (bash, zsh, dash, busybox sh, mksh) instead requiring
"which" as an extra dependency (usable on containers).

Update the INSTALL file too.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
INSTALL
autogen.sh