diff --git a/README b/README index a284e88..a4fd8e1 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ Speakup + voxin on 32 or 64 bits machines -2013, 2016 Gilles Casse +2013, 2017 Gilles Casse This software installs voxinup [1], the speakup connector for voxin. @@ -15,6 +15,12 @@ The uninstall.sh script removes voxinup and enables espeakup instead. sudo ./install.sh +* Troubleshooting +** voxinup stops talking + +Type as root: +systemctl restart voxinup + * [1] voxinup ** sources diff --git a/conf.inc b/conf.inc index 54f247d..573607e 100644 --- a/conf.inc +++ b/conf.inc @@ -7,26 +7,26 @@ check_distro() # Check if this is an arch linux based distro if [ -e "/etc/pacman.conf" ]; then - check_speakup=arch_check_speakup - check_libvoxin=arch_check_libvoxin - install_connector=arch_install_connector - uninstall_connector=arch_uninstall_connector - status=0 + check_speakup=arch_check_speakup + check_libvoxin=arch_check_libvoxin + install_connector=arch_install_connector + uninstall_connector=arch_uninstall_connector + status=0 else - # Check if this is a debian based distro - type dpkg &> /dev/null - if [ "$?" = "0" ]; then - check_speakup=debian_check_speakup - check_libvoxin=debian_check_libvoxin - install_connector=debian_install_connector - uninstall_connector=debian_uninstall_connector - status=0 - if [ "$ARCH" = "x86_64" ]; then - ARCH=amd64 - else - ARCH=i386 - fi - fi + # Check if this is a debian based distro + type dpkg &> /dev/null + if [ "$?" = "0" ]; then + check_speakup=debian_check_speakup + check_libvoxin=debian_check_libvoxin + install_connector=debian_install_connector + uninstall_connector=debian_uninstall_connector + status=0 + if [ "$ARCH" = "x86_64" ]; then + ARCH=amd64 + else + ARCH=i386 + fi + fi fi return $status } @@ -45,20 +45,20 @@ arch_install_connector() { local e=0 pacman -U build/archlinux/voxinup-*-$ARCH.pkg.tar.xz if [ "$?" != "0" ]; then - return 1 + return 1 fi pacman -Q espeakup &> /dev/null if [ "$?" = "0" ]; then - e=1 - systemctl disable espeakup + e=1 + systemctl disable espeakup fi systemctl enable voxinup if [ "$e" = "1" ]; then - echo "Trying to stop espeakup" - systemctl stop espeakup + echo "Trying to stop espeakup" + systemctl stop espeakup fi systemctl start voxinup } @@ -68,8 +68,8 @@ arch_uninstall_connector() { systemctl stop voxinup pacman -Q espeakup &> /dev/null if [ "$?" = "0" ]; then - systemctl enable espeakup - systemctl start espeakup + systemctl enable espeakup + systemctl start espeakup fi pacman -R voxinup } @@ -85,14 +85,20 @@ debian_check_libvoxin() { } debian_install_connector() { - # apt-get install -y lib32gcc1 libc6-i386 libasound2:i386 - apt-get remove -y espeakup + local e=0 + set +e + dpkg -V espeakup && apt-get remove -y espeakup + set -e dpkg -i build/debian/voxinup_*_$ARCH.deb + systemctl enable voxinup } debian_uninstall_connector() { echo TODO apt-get remove -y voxinup apt-get install -y espeakup + if [ $? = 0 ]; then + systemctl enable espeakup + fi }