From eee90c0f1bc00d4103e55d9dbe98131ab634d0c4 Mon Sep 17 00:00:00 2001 From: Elie De Brauwer Date: Fri, 30 Aug 2013 23:59:10 +0200 Subject: make.sh: Fix probing for python2.x and be verbose in error reporting --- scripts/make.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'scripts/make.sh') diff --git a/scripts/make.sh b/scripts/make.sh index ecc92686..52939d7f 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -139,12 +139,17 @@ GLOBSTRUCT="$(getglobals)" echo "generated/help.h" # Only recreate generated/help.h if python2 is installed. Does not work with 3. -PYTHON="$(which python2)" -if [ ! -z "$PYTHON" ] && - [ ! -z "$(grep 'CONFIG_TOYBOX_HELP=y' $KCONFIG_CONFIG)" ] +PYTHON="$(which python2 || which python2.6 || which python2.7)" +if [ ! -z "$(grep 'CONFIG_TOYBOX_HELP=y' $KCONFIG_CONFIG)" ]; then - echo "Extract help text from Config.in." - "$PYTHON" scripts/config2help.py Config.in > generated/help.h || exit 1 + if [ -z "$PYTHON" ]; + then + echo "Python 2.x required when CONFIG_TOYBOX_HELP is enabled" + exit 1 + else + echo "Extract help text from Config.in." + "$PYTHON" scripts/config2help.py Config.in > generated/help.h || exit 1 + fi fi # Extract a list of toys/*/*.c files to compile from the data in $KCONFIG_CONFIG -- cgit v1.2.3