From 426fb15b18c172abdeeda8b1fc76c1561d0acbf3 Mon Sep 17 00:00:00 2001 From: Patrick Jungermann Date: Tue, 9 Apr 2024 01:18:09 +0200 Subject: [PATCH] ci: add consistent python3/python handling at build.sh --- build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 6fd90fec8da..153786fed68 100755 --- a/build.sh +++ b/build.sh @@ -18,5 +18,9 @@ fi # Prettify `search_index.json` after `mkdocs` # `mkdocs` removed its own prettify few years ago: https://github.com/mkdocs/mkdocs/pull/1128 -python -m json.tool ./site/search/search_index.json >./site/search/search_index_new.json +if type python3 >/dev/null 2>/dev/null; then + python3 -m json.tool ./site/search/search_index.json >./site/search/search_index_new.json +else + python -m json.tool ./site/search/search_index.json >./site/search/search_index_new.json +fi mv -f -- ./site/search/search_index_new.json ./site/search/search_index.json