-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.sh
executable file
·77 lines (70 loc) · 2.35 KB
/
main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#------------------------------------------------------------------------
rm foo.wav
clear && echo " "
au=0;
i=0;
i=$(cat auth.txt | grep "i=")
au=$(cat auth.txt | grep "auth")
ch=$(cat auth.txt | grep "uname")
if [ "$i" == "i=1" ]
then
a=1
while [ $a -le 3 ]
do
# 1. AUthentication ------------------------------------------------------------------------
espeak "checking for authentication" -w foo.wav
gnome-terminal -- ./interface.sh
sleep 1
read -p "checking for authentication :" ch
if [ "$au" == "auth:$ch" ]
then
espeak "Welcome back you sir " -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 0.5
echo " "
echo " Welcome back you sir "
# 2. - 7. ---------------------------------------------------------------------------------
#./initialization.sh
# 8.Greetings ------------------------------------------------------------------------------
./greetings.sh "$ch"
# 9. voice/string search assistant ---------------------------------------------------------
./string_search.sh "$ch"
else
espeak "authentication failed $a time" -w foo.wav
gnome-terminal -- ./interface.sh
sleep 2
if [ $a == 3 ]
then
espeak "Authentication failed for,matting com,plete data" -w foo.wav
gnome-terminal -- ./interface.sh
sleep 1
rm auth.txt
fi
a=$(( a+1 ))
fi
done
else
# 1.1 Adding new user --------------------------------------------------------------------
espeak "welcome sir" -w foo.wav
gnome-terminal -- ./interface.sh
sleep 1
echo " Welcome sir."
echo " " && clear
espeak "may i have your name sir" -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
read -p "May i have your name ? :" ch
echo "uname:$ch" >> auth.txt
echo "i=1" >> auth.txt
espeak "Enter your new authentication credential:" -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
read -p "Enter your new authentication credential:" au
echo "auth:$au" >> auth.txt
# 2. - 7. ---------------------------------------------------------------------------------
./initialization.sh
# 8.Greetings ------------------------------------------------------------------------------
./greetings.sh "$ch"
# 9. voice/string search assistant ---------------------------------------------------------
./string_search.sh "$ch"
fi