From 4cd94563eec90396af3d19bda4a1e7369d5a8754 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 12 May 2021 02:49:51 -0400 Subject: [PATCH] Fixed some bugs in the --register option. --- speech/install_cepstral.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/speech/install_cepstral.sh b/speech/install_cepstral.sh index d36e2da..c356598 100755 --- a/speech/install_cepstral.sh +++ b/speech/install_cepstral.sh @@ -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