Revision 5bd3a15e

View differences:

setup.sh
475 475
#                 No error or warning occurred.
476 476
#
477 477
function main {
478
  local userdir=$(pwd)
479
  cd $(realpath $(dirname ${BASH_SOURCE[0]}))
480

  
478 481
  # print welcome/info text if not suppressed
479 482
  if [[ $@ != *"--noinfo"* ]]; then
480 483
    printWelcomeText
......
514 517
  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
515 518
    printHelp
516 519
    printf "\n"
520
    cd $userdir
517 521
    quitScript
518 522
  fi
519 523

  
......
533 537
        -c|--compiler)
534 538
          compilerSetup; printf "\n"; shift 1;;
535 539
        -q|--quit)
536
          quitScript; shift 1;;
540
          cd $userdir; quitScript; shift 1;;
537 541
        --log=*|--LOG=*) # already handled; ignore
538 542
          shift 1;;
539 543
        --log|--LOG) # already handled; ignore
......
574 578
      C|c)
575 579
        compilerSetup; printf "\n";;
576 580
      Q|q)
577
        quitScript;;
581
        cd $userdir; quitScript;;
578 582
      *) # sanity check (exit with error)
579 583
        printError "unexpected argument: $userinput\n";;
580 584
    esac
581 585
  done
582 586

  
587
  cd $USER_DIR
583 588
  exit 0
584 589
}
585 590

  

Also available in: Unified diff