mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 14:53:11 +01:00
Avoid replicated logic by having a common library to set the PYTHON environment variable. Reviewed-by: Athira Jajeev <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
17 lines
339 B
Bash
17 lines
339 B
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
if [ "x$PYTHON" = "x" ]
|
|
then
|
|
python3 --version >/dev/null 2>&1 && PYTHON=python3
|
|
fi
|
|
if [ "x$PYTHON" = "x" ]
|
|
then
|
|
python --version >/dev/null 2>&1 && PYTHON=python
|
|
fi
|
|
if [ "x$PYTHON" = "x" ]
|
|
then
|
|
echo Skipping test, python not detected please set environment variable PYTHON.
|
|
exit 2
|
|
fi
|