#!/bin/sh
#
# The script to remove specified output support from the VoiceMan speech system.
# It removes symlink /etc/voiceman.d/<name>.output.
# Copyright (c) 2000-2010 Michael Pozhidaev <msp@altlinux.org>

THIS="${0##*/}"

if [ -z "$1" ]; then
    echo "$THIS:TTS name is not specified" >&2
    exit 1
fi

LINKNAME="/etc/voiceman.d/$1.output"

if ! [ -e "$LINKNAME" ]; then
    echo "$THIS:$LINKNAME does not exist" >&2
    exit 1
fi

/bin/rm -f "$LINKNAME"
exit $?
