From 69101224691c5570acba4aafd467253d0ebbf638 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Thu, 5 Mar 2020 15:18:53 +0000 Subject: [PATCH 1/2] Add Python, Perl and Pylint to output_env.sh Add the versions of Python, Perl, and Pylint to the version dump provided by the output_env.sh script. Signed-off-by: Simon Butcher --- scripts/output_env.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/output_env.sh b/scripts/output_env.sh index 22bef92b9..069e572d2 100755 --- a/scripts/output_env.sh +++ b/scripts/output_env.sh @@ -23,7 +23,7 @@ print_version() shift ARGS="$1" shift - VARIANT=$1 + VARIANT="$1" shift if [ -n "$VARIANT" ]; then @@ -45,6 +45,10 @@ print_version() VERSION_STR=`echo "$VERSION_STR" | $FILTER` done + if [ -z "$VERSION_STR" ]; then + VERSION_STR="Version could not be determined." + fi + echo " * ${BIN##*/}$VARIANT: ${BIN} : ${VERSION_STR} " } @@ -61,6 +65,7 @@ fi echo print_version "uname" "-a" "" + echo echo echo "** Tool Versions:" @@ -94,6 +99,15 @@ echo print_version "gdb" "--version" "" "head -n 1" echo +print_version "perl" "--version" "" "head -n 2" "grep ." +echo + +print_version "python" "--version" "" "head -n 1" +echo + +print_version "pylint3" "--version" "" "head -n 2" "tail -n 1" +echo + : ${OPENSSL:=openssl} print_version "$OPENSSL" "version" "default" echo From 9693ea2490b7b0640d8e0f09989f45ef471650a6 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Fri, 6 Mar 2020 14:50:49 +0000 Subject: [PATCH 2/2] Fix output_env.sh for varying pylint3 output `pylint3 --version` will output to stderr the status of the config file it's using. This can be "No config file found" or "Using config file" or nothing. This means the pylint version may or may not be on the first line. Therefore this commit changes the filters on the pylint3 version output to first strip out the config line, and then to select only the pylint line. Signed-off-by: Simon Butcher --- scripts/output_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/output_env.sh b/scripts/output_env.sh index 069e572d2..0e0679479 100755 --- a/scripts/output_env.sh +++ b/scripts/output_env.sh @@ -105,7 +105,7 @@ echo print_version "python" "--version" "" "head -n 1" echo -print_version "pylint3" "--version" "" "head -n 2" "tail -n 1" +print_version "pylint3" "--version" "" "sed /^.*config/d" "grep pylint" echo : ${OPENSSL:=openssl}