root/xchestival/install.sh

Revision 1064, 2.2 kB (checked in by alpt, 3 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/bin/bash
2
3 festival_lib="/usr/lib/festival/"
4 if [ ! -z $1 ]
5 then
6         festival_lib=$1
7 fi
8
9 for xyz in `cat required`
10 do
11         if ! whereis -b $xyz | cut -d ":" -f 2 | grep $xyz > /dev/null
12         then
13                 echo "Devi avere il programma \"$xyz\"! Installalo!"
14                 echo "Non posso installare nulla senza quel programma."
15                 echo "Leggi il README"
16                 exit 1
17         fi
18 done
19
20 if [ ! -d $festival_lib ]
21 then 
22         echo "Cazzone, controlla che hai festival installato!"
23         echo "Se e' tutto in regola allora devi modificare la variabile"
24         echo "\$festival_lib che trovi dentro di me,"
25         echo "ora come ora e' settata ad: $festival_lib"
26         echo "Se vuoi puoi passare il path della root di festival direttamente"
27         echo "da linea di comando, ad esempio:"
28         echo "\# ./install.sh /usr/lib/festival"
29         echo "suca"
30         exit 1
31 fi
32
33 if ( test $(id -u) != 0) then
34         echo "Devi essere r00t frocione!"
35         exit 1
36 fi
37
38
39 if [ ! -f $festival_lib/voices/italian/lp_mbrola/it4/it4.txt ]
40 then
41         echo "E' la prima volta che stai installando xchestival."
42         echo "Vedrai che figata!"
43         if [ ! -f festival-it.tar.bz2 ]
44         then
45                 echo "Ora mi prendo le voci italiane di festival."
46                 wget http://www.freaknet.org/alpt/src/xchestival/files/festival-it.tar.bz2
47                 echo ""
48         fi
49
50         if [ ! -d festival-it/ ]
51         then
52                 echo "Scompatto il malloppone"
53                 tar jxvf festival-it.tar.bz2
54         fi
55
56         echo "k, ora incomincio a copiare il tutto in $festival_lib"
57         echo "5"; sleep 1; echo 4; sleep 1; echo 3; sleep 1; echo 2; sleep 1; echo 1; sleep 1
58         echo "Sto copiando!"
59
60         cp -r festival-it/* $festival_lib
61 fi
62
63 echo ""
64 echo "Ora testo le voci mbrola, se il test da' qualche errore allora devi"
65 echo "controllare l'installzione  di mbrola e di festival"
66
67 printf "(voice_lp_mbrola)\n(SayText \"Ora sto' testando la mia voce sensuale\")\n" | festival --pipe
68 echo ""
69
70 echo "Ora copio gli script in /usr/share/xchestival/"
71 if [ ! -d /usr/share/xchestival/ ]; then mkdir /usr/share/xchestival/; fi
72 cp xchestival.sub xchat_speak.pl irssi_speak.pl /usr/share/xchestival/
73 echo "****** ATTENZIONE ********"
74 echo "Dal tuo utente fai: "
75 echo $ cp xchestival.sub '~/.xchat2/'
76 echo ""
77 echo "Dal tuo utente fai: "
78 echo $ cp xchestival.sub ' ~/.irssi/'
79 echo "****** ATTENZIONE ********"
80
81 echo ""
82
83 echo "Tutto fatto, ora apri xchat ed usa lo script."
84 echo "Leggiti il README se non sai cosa fare ^_^"
85 echo "Enjoy!"
Note: See TracBrowser for help on using the browser.