Check small spacing details.

This commit is contained in:
Luis Guzmán 2023-10-24 21:04:08 -06:00
parent f39deaf1df
commit 6b0e2d3e48
1 changed files with 10 additions and 8 deletions

View File

@ -44,10 +44,13 @@ if [ "$(id -u)" = 0 ]; then
printwc "${Yellow}" "Please don't use with root privileges, sudo will be used only when necessary!" printwc "${Yellow}" "Please don't use with root privileges, sudo will be used only when necessary!"
exit 0 exit 0
fi fi
#--------------------------------------------------
print_title "Check for supported arch."
#--------------------------------------------------
if dpkg-architecture -e amd64 ;then if dpkg-architecture -e amd64 ;then
printwc "${Green}" "> amd64: supported architecture." printwc "${Green}" " amd64: supported architecture.\n"
else else
printwc "${Red}" "> Warning: Only run this script on amd64 arch." printwc "${Red}" " Warning: Only run this script on amd64 arch.\n"
exit exit
fi fi
@ -62,9 +65,8 @@ NERD_DIC_GIT_REPO="https://github.com/ideasman42/nerd-dictation.git"
OPT_VOSK="/opt/vosk-python" OPT_VOSK="/opt/vosk-python"
#-------------------------------------------------- #--------------------------------------------------
print_title "# Select language." print_title "> Vosk Model Language selection."
#-------------------------------------------------- #--------------------------------------------------
printf "\n> Vosk Model Language selection.\n"
PS3='Select one of the available language models to use on nerd-dictation: ' PS3='Select one of the available language models to use on nerd-dictation: '
options=("English" "Spanish" "French" "German" "Chinese" "Exit") options=("English" "Spanish" "French" "German" "Chinese" "Exit")
select opt in "${options[@]}" select opt in "${options[@]}"
@ -130,7 +132,7 @@ sudo python3 "$OPT_VOSK"/setup.py install
if [ $? = 0 ]; then if [ $? = 0 ]; then
sudo rm "$OPT_VOSK"/setup.py sudo rm "$OPT_VOSK"/setup.py
else else
printwc "${Red}" "Something went wrong, please check setup.py file" printwc "${Red}" "Something went wrong, please check setup.py file\n"
exit exit
fi fi
@ -156,7 +158,7 @@ unzip "$(basename $VOSK_MODEL)"
if [ $? = 0 ]; then if [ $? = 0 ]; then
rm "$(basename $VOSK_MODEL)" rm "$(basename $VOSK_MODEL)"
else else
printwc "${Red}" "Something went wrong, please check $(basename $VOSK_MODEL) file" printwc "${Red}" "Something went wrong, please check $(basename $VOSK_MODEL) file\n"
exit exit
fi fi
mv "$VOSK_FOLDER" model mv "$VOSK_FOLDER" model
@ -170,7 +172,7 @@ print_title "Setup local bin for nerd-dictation"
ln -s "$HOME"/.local/nerd-dictation/nerd-dictation "$HOME"/.local/bin ln -s "$HOME"/.local/nerd-dictation/nerd-dictation "$HOME"/.local/bin
if [ $? = 0 ]; then if [ $? = 0 ]; then
printwc "${Green}" "Completed script!\nPlease exit and login for nerd-dictation to be used on the terminal." printwc "${Green}" "Completed script!\nPlease exit and login for nerd-dictation to be used on the terminal.\n"
else else
printwc "${Red}" "Something went wrong please check the previous output." printwc "${Red}" "Something went wrong please check the previous output.\n"
fi fi