mirror of
https://github.com/jhechavarria/say.sh.git
synced 2025-12-10 06:06:59 +00:00
debogage de la fonction saylng et de l'instruction uninstall
This commit is contained in:
8
say.sh
8
say.sh
@@ -53,7 +53,7 @@ saycfg ()
|
|||||||
# Get/Set synthesiser lamguage
|
# Get/Set synthesiser lamguage
|
||||||
saylng ()
|
saylng ()
|
||||||
{
|
{
|
||||||
cfg=`cat $CFGPATH`;
|
cfg=( `cat $CFGPATH` );
|
||||||
if ! [ $# -eq 1 ]; then
|
if ! [ $# -eq 1 ]; then
|
||||||
echo "${cfg[0]}"; return;
|
echo "${cfg[0]}"; return;
|
||||||
fi
|
fi
|
||||||
@@ -63,7 +63,7 @@ saylng ()
|
|||||||
fi
|
fi
|
||||||
saysupport $text;
|
saysupport $text;
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
cfg[0]=$text
|
cfg[0]="$text"
|
||||||
echo "${cfg[*]}" > $CFGPATH
|
echo "${cfg[*]}" > $CFGPATH
|
||||||
else
|
else
|
||||||
echo "\"$1\" is unsupported. Supported languages: ${P2WLNGS[*]}";
|
echo "\"$1\" is unsupported. Supported languages: ${P2WLNGS[*]}";
|
||||||
@@ -218,8 +218,8 @@ elif [ "$1" = "install" ]; then
|
|||||||
sudo apt-get install libttspico-utils sox zenity xsel;
|
sudo apt-get install libttspico-utils sox zenity xsel;
|
||||||
fi
|
fi
|
||||||
elif [ "$1" = "uninstall" ]; then
|
elif [ "$1" = "uninstall" ]; then
|
||||||
cat "$HOME/.bashrc" | grep -v "$SRCPATH" > ~/.bashrc
|
#cat "$HOME/.bashrc" | grep -v "$SRCPATH" > ~/.bashrc
|
||||||
echo "Script autoload instruction removed from $HOME/.bashrc"
|
#echo "Script autoload instruction removed from $HOME/.bashrc"
|
||||||
source "$HOME/.bashrc"
|
source "$HOME/.bashrc"
|
||||||
echo "Reloaded source: $HOME/.bashrc"
|
echo "Reloaded source: $HOME/.bashrc"
|
||||||
rm -rf "$ROOTPATH"
|
rm -rf "$ROOTPATH"
|
||||||
|
|||||||
Reference in New Issue
Block a user