-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathsimple.sh
executable file
·91 lines (67 loc) · 1.25 KB
/
simple.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
#
# Developed by Rafael Corrêa Gomes
# Contact [email protected]
#
#==================================== Imports ===============================================
# Import base
. base/import.sh
# Import Sytem
. system/import.sh
# Import Server Side
. server/import.sh
# Import Desktop
. desktop/import.sh
# Presentation function and options
welcome(){
clear
echo -e "
${txtblu}
===================================
AutoInstall SH
Created by Rafael Corrêa Gomes
===================================
${txtrst}Options:
${Red}########## System${txtrst}
"
for file in $(ls ./system)
do
if [ $file != import.sh ]
then
echo $file
fi
done;
echo -e "
${Yellow}########## Server Side
${txtrst} "
for file in $(ls ./server)
do
if [ $file != import.sh ]
then
echo $file
fi
done;
echo -e "
${Purple}########## Desktop
${txtrst} "
for file in $(ls ./desktop)
do
if [ $file != import.sh ] && [ $file != files ]
then
echo $file
fi
done;
echo -e "
e - Exit
==================================
Enter an option:
"
read program
case $program in
# Performs the function with the name of the variable passed
e) clear; exit;;
$program) $program; ready;;
*) welcome;;
esac
}
welcome