Revision 7a91596e ide/QtCreator/QtCreatorSetup.sh
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 |
Also available in: Unified diff