-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLinux-Setup.sh
More file actions
76 lines (57 loc) · 1.99 KB
/
Linux-Setup.sh
File metadata and controls
76 lines (57 loc) · 1.99 KB
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
# Setup GCC
# Updating The apt
sudo apt-get update
# Fixing the broken packages
sudo apt --fix-broken install
# Installing the build-essential and gcc
sudo apt install build-essential gcc --fix-missing
# Setting up The Required Libraries
sudo apt-get install libmongoc-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install pkg-config
# Setting up the files folders
mkdir database/files
echo ""
echo ""
# Take input for full Path
echo "Enter the Full Path from Root Folder of Operating System :- "
echo "For Example :- /vagrant/Authentication-System-C/ (/ at the end is mandatory)"
read path
echo >> singlaheader.h
echo "#define PATH \"$path"\" >> singlaheader.h
echo >> singlaheader.h
echo "#include \"database/utils/getData.h\"" >> singlaheader.h
echo "#include \"database/src/userExists.h\"" >> singlaheader.h
echo "#include \"database/src/insertDB.h\"" >> singlaheader.h
echo "#include \"database/utils/generateCode.h\"" >> singlaheader.h
echo "#include \"database/src/sendmail.h\"" >> singlaheader.h
echo "#include \"pages/login.h\"" >> singlaheader.h
echo "#include \"pages/signUp.h\"" >> singlaheader.h
echo "#include \"pages/reset.h\"" >> singlaheader.h
echo ""
echo ""
# Take input for email and saving it as text file in database folder
echo "Enter your email address : "
read email
echo $email > mailuser.txt
mv mailuser.txt database/files
echo ""
# Take input for App Appword for Gmail and saving it as text file in database folder
echo "Enter your App Password: "
read appword
echo $appword > mailpass.txt
mv mailpass.txt database/files
echo ""
# Take input for MongoDb URL and saving it as text file in database folder
echo "Enter your MongoDb URL: "
read url
echo $url > mongouri.txt
mv mongouri.txt database/files
echo ""
# Ending by printing the message
echo "Setup Completed Successfully"
echo ""
# End of the Script
echo "Please Run Command: ./app.sh to run the application"
echo "To Build the Static Library for whole Authentication System Run Command: ./Auth-Setup.sh"
echo "Thank You"