Revision 768babc5 tools/ide/QtCreator/QtCreatorSetup.sh

View differences:

tools/ide/QtCreator/QtCreatorSetup.sh
492 492
  fi
493 493

  
494 494
  # check for existing project files
495
  local projectfiles=""
495
  local projectfiles=()
496 496
  for module in ${modules[@]}; do
497
    projectfiles+="$(find ${projectsdir} -maxdepth 1 -type f | grep -E "${module}\.(includes|files|config|creator)$")"
497
    projectfiles+=($(find ${projectsdir} -maxdepth 1 -type f -regextype posix-extended -regex "^.*/${module}\.(includes|files|config|creator)$" | sort))
498 498
  done
499
  IFS=$'\n'; projectfiles=($projectfiles); unset IFS
500 499
  if [ ! -z "${projectfiles[*]}" ]; then
501 500
    printWarning "The following files will be removed:\n"
502 501
    for pfile in ${projectfiles[@]}; do
......
507 506
    readUserInput "YyNn" userinput
508 507
    case "${userinput}" in
509 508
      Y|y)
510
        for pfile in ${projectfiles[*]}; do
509
        for pfile in ${projectfiles[@]}; do
511 510
          rm "$pfile"
512 511
        done
513 512
        ;;
......
602 601
  # list all files to be deleted
603 602
  if [ -z "$modulename" ]; then
604 603
    if [ $wipe != true ]; then
605
      files=$(find "${projectdir}" -maxdepth 1 -type f | grep -E "^.+\.(includes|files|config|creator|cflags|cxxflags)$")
604
      files=$(find "${projectdir}" -maxdepth 1 -type f | grep -E "^.+\.(includes|files|config|creator|cflags|cxxflags)$" | sort)
606 605
    else
607
      files=$(find "${projectdir}" -maxdepth 1 -type f | grep -E "^.+\.(includes|files|config|creator|cflags|cxxflags|creator(\.user(\..+)?)?)$")
606
      files=$(find "${projectdir}" -maxdepth 1 -type f | grep -E "^.+\.(includes|files|config|creator|cflags|cxxflags|creator(\.user(\..+)?)?)$" | sort)
608 607
    fi
609 608
  else
610 609
    if [ $wipe != true ]; then
611
      files=$(find "${projectdir}" -maxdepth 1 -type f | grep -E "^${modulename}\.(includes|files|config|creator|cflags|cxxflags)$")
610
      files=$(find "${projectdir}" -maxdepth 1 -type f | grep -E "^${modulename}\.(includes|files|config|creator|cflags|cxxflags)$" | sort)
612 611
    else
613
      files=$(find "${projectdir}" -maxdepth 1 -type f | grep -E "^${modulename}\.(includes|files|config|creator|cflags|cxxflags|creator(\.user(\..+)?)?)$")
612
      files=$(find "${projectdir}" -maxdepth 1 -type f | grep -E "^${modulename}\.(includes|files|config|creator|cflags|cxxflags|creator(\.user(\..+)?)?)$" | sort)
614 613
    fi
615 614
  fi
616 615
  if [ ! -z "$files" ]; then

Also available in: Unified diff