Fixed some bugs in the --register option.
This commit is contained in:
		| @@ -15,9 +15,9 @@ export DISPLAY="${DISPLAY:-:0}" | ||||
| register() { | ||||
|     local v="${1##*Cepstral_}" | ||||
|     v="${v%%_*}" | ||||
|     company="$(dialog --inputbox "Company name (leave empty if none)" -1 -1 --stdout)" | ||||
|     customer="$(dialog --inputbox "Customer name" -1 -1)" || exit $? | ||||
|     key="$(dialog --inputbox "License key" -1 -1)" || exit $? | ||||
|     company="$(dialog --clear --inputbox "Company name (leave empty if none)" -1 -1 --stdout)" || exit $? | ||||
|     customer="$(dialog --clear --inputbox "Customer name" -1 -1 --stdout)" || exit $? | ||||
|     key="$(dialog --clear --inputbox "License key" -1 -1 --stdout)" || exit $? | ||||
|     eval "wine \"c:\\Cepstral\\bin\\swift.exe\" --reg-voice --voice-name \"'$v'\" --customer-name \"'$customer'\" --company-name \"'$company'\" --license-key \"'$key'\"" | ||||
|     exit 0 | ||||
| } | ||||
| @@ -80,7 +80,7 @@ if [[ -z "${WINEPREFIX}" ]]; then | ||||
| fi | ||||
|   | ||||
|  | ||||
| if [ "$1" == "-r" || "$1" == "--register" ]; then | ||||
| if [[ "$1" == "-r" || "$1" == "--register" ]]; then | ||||
|     action="register" | ||||
| fi | ||||
|  | ||||
| @@ -89,10 +89,11 @@ voice="$(dialog --backtitle "Use the up and down arrow keys to find the option y | ||||
|         --no-tags \ | ||||
|         --menu "Select A voice to $action" 0 0 0 "${voices[@]}" --stdout)" | ||||
|                                                                                                                                                        | ||||
| if [ "$1" == "-r" || "$1" == "--register" ]; then | ||||
| if [[ "$1" == "-r" || "$1" == "--register" ]]; then | ||||
|     register $voice | ||||
| fi | ||||
|  | ||||
| exit 0 | ||||
| # make sure the ~/Downloads directory exists. | ||||
| mkdir -p ~/Downloads | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user