#!/bin/sh
#
# The script to add specified TTS support to the VoiceMan speech system.
# It creates symlink /etc/voiceman.d/<name>.voiceman to /etc/tts.d/<name>.voiceman.
# Copyright (c) 2000-2008 Michael Pozhidaev <msp@altlinux.org>

if [ "$1" == '' ]; then
   echo "$0:TTS name is not specified"
   exit 1
fi

LINKNAME="/etc/voiceman.d/$1.voiceman"
DESTNAME="/etc/tts.d/$1.voiceman"

if ! [ -e "$DESTNAME" ]; then
   echo "error:$DESTNAME does not exist"
   exit 1
fi

ln -s "$DESTNAME" "$LINKNAME"
