Revision 9cee554d tools/ide/QtCreator/QtCreatorSetup.sh

View differences:

tools/ide/QtCreator/QtCreatorSetup.sh
382 382
#                 No error or warning occurred.
383 383
#            -1
384 384
#                 Error: Command 'arm-none-eabi-gcc' not found.
385
#            -2
386
#                 Error: include directory could not be resolved
385 387
#
386 388
function retrieveGccIncludeDir {
387 389
  # retrieve binary path or link
388 390
  local binpath=$(which arm-none-eabi-gcc)
391
  local gccincpath=""
389 392
  if [ -z "$binpath" ]; then
390 393
    printError "command 'arm-none-eabi-gcc' not found\n"
391 394
    return -1
......
398 401
    printInfo "gcc-arm-none-eabi detected: $binpath\n"
399 402

  
400 403
    # return include path
401
    eval $1=$(realpath $(dirname ${binpath})/../arm-none-eabi/include/)
402

  
403
    return 0
404
    gccincpath=$(realpath $(dirname ${binpath})/../arm-none-eabi/include/)
405
    if [ ! -d "$gccincpath" ]; then
406
      printWarning "$gccincpath does not exist\n"
407
      return -2
408
    else
409
      eval $1="$gccincpath"
410
      return 0
411
    fi
404 412
  fi
405 413
}
406 414

  

Also available in: Unified diff