Revision 7a91596e

View differences:

ide/QtCreator/QtCreatorSetup.sh
111 111
  eval set -- "$arguments"
112 112

  
113 113
  # evaluate arguments
114
  local numchars=1
114
  local numchars=0
115 115
  local options=""
116 116
  local outvar=""
117 117
  while [ true ]; do
......
137 137
  # read user input
138 138
  local _userinput=""
139 139
  while [ -z $_userinput ] || ( [ $numchars == 1 ] && [ ! -z "$options" ] && [[ ! $_userinput =~ ^["$options"]$ ]] ); do
140
    read -p "your selection: " -n $numchars -e _userinput
140
    if [ $numchars == 0 ]; then
141
      read -p "your selection: " -e _userinput
142
    else
143
      read -p "your selection: " -n $numchars -e _userinput
144
    fi
141 145
    if [ -z $_userinput ] || ( [ $numchars == 1 ] && [ ! -z "$options" ] && [[ ! $_userinput =~ ^["$options"]$ ]] ); then
142 146
      printWarning "[$_userinput] is no valid action\n"
143 147
    fi
......
795 799
  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
796 800
    printHelp
797 801
    printf "\n"
798
    exitScript
802
    quitScript
799 803
  fi
800 804

  
801 805
  # handle command line arguments
ide/setup_IDE.sh
111 111
  eval set -- "$arguments"
112 112

  
113 113
  # evaluate arguments
114
  local numchars=1
114
  local numchars=0
115 115
  local options=""
116 116
  local outvar=""
117 117
  while [ true ]; do
......
137 137
  # read user input
138 138
  local _userinput=""
139 139
  while [ -z $_userinput ] || ( [ $numchars == 1 ] && [ ! -z "$options" ] && [[ ! $_userinput =~ ^["$options"]$ ]] ); do
140
    read -p "your selection: " -n $numchars -e _userinput
140
    if [ $numchars == 0 ]; then
141
      read -p "your selection: " -e _userinput
142
    else
143
      read -p "your selection: " -n $numchars -e _userinput
144
    fi
141 145
    if [ -z $_userinput ] || ( [ $numchars == 1 ] && [ ! -z "$options" ] && [[ ! $_userinput =~ ^["$options"]$ ]] ); then
142 146
      printWarning "[$_userinput] is no valid action\n"
143 147
    fi
......
375 379
  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
376 380
    printHelp
377 381
    printf "\n"
378
    exitScript
382
    quitScript
379 383
  fi
380 384

  
381 385
  # handle command line arguments
setup.sh
111 111
  eval set -- "$arguments"
112 112

  
113 113
  # evaluate arguments
114
  local numchars=1
114
  local numchars=0
115 115
  local options=""
116 116
  local outvar=""
117 117
  while [ true ]; do
......
137 137
  # read user input
138 138
  local _userinput=""
139 139
  while [ -z $_userinput ] || ( [ $numchars == 1 ] && [ ! -z "$options" ] && [[ ! $_userinput =~ ^["$options"]$ ]] ); do
140
    read -p "your selection: " -n $numchars -e _userinput
140
    if [ $numchars == 0 ]; then
141
      read -p "your selection: " -e _userinput
142
    else
143
      read -p "your selection: " -n $numchars -e _userinput
144
    fi
141 145
    if [ -z $_userinput ] || ( [ $numchars == 1 ] && [ ! -z "$options" ] && [[ ! $_userinput =~ ^["$options"]$ ]] ); then
142 146
      printWarning "[$_userinput] is no valid action\n"
143 147
    fi
......
456 460
  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
457 461
    printHelp
458 462
    printf "\n"
459
    exitScript
463
    quitScript
460 464
  fi
461 465

  
462 466
  # handle command line arguments

Also available in: Unified diff