Merge pull request #15441 from fjmolinas/pr_jlnink_test_version_gui

dist/tools/jlink: add -nogui to version test, fix for OSX
This commit is contained in:
Alexandre Abadie 2020-11-13 15:39:36 +01:00 committed by GitHub
commit b0ad1564aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,7 +157,9 @@ test_term() {
test_version() {
JLINK_MINIMUM_VERSION="6.74"
JLINK_VERSION=$(echo q | "$JLINK" 2> /dev/null | grep "^DLL version*" | grep -oP "\d+\.\d+")
# Adding '-nogui 1' will simply return 'Unknown command line option -nogui'
# on older versions, JLINK_VERSION will still be parsed correctly.
JLINK_VERSION=$(echo q | "${JLINK}" -nogui 1 2> /dev/null | grep "^DLL version*" | grep -oE "[0-9]+\.[0-9]+")
if [ $? -ne 0 ]; then
echo "Error: J-Link appears not to be installed on your PATH"