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