-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstart
69 lines (59 loc) · 1.73 KB
/
start
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
# this file check all the required softwares and makes the code
# if any dependies is not satisfied it prints it
if command -v g++ &>/dev/null; then
echo "g++ complier found"
else
echo "g++ compiler not found please install it TMD GCC or sudo apt install gcc followed by sudo apt install g++"
exit 1
fi
if command -v python3 &>/dev/null; then
echo Python 3 is installed
if python3 -c "import requests"&>/dev/null; then
echo "Python3 Library request Found"
else
echo "Please Install requests Python3 Library"
exit 1
fi
if python3 -c "import smtplib"&>/dev/null; then
echo "Python3 Library smtplib Found"
else
echo "Please3 Install smtplib Python3 Library"
exit 1
fi
if python3 -c "import ssl"&>/dev/null; then
echo "Python3 Library ssl Found"
else
echo "Please3 Install ssl Python Library"
exit 1
fi
if python3 -c "import sys"&>/dev/null; then
echo "Python3 Library sys Found"
else
echo "Please Install sys Python3 Library"
exit 1
fi
if python3 -c "import json"&>/dev/null; then
echo "Python3 Library json Found"
else
echo "Please Install json Python3 Library"
exit 1
fi
echo "All dependies satisfied Compiling Code"
if g++ main.cpp; then
echo "Compilation Success!!";
else
echo "Compilation Failure!!!";
exit 1
fi
if ping -q -c 1 -W 1 google.com >/dev/null; then
echo "Internet connected"
else
echo "Internet Not Found Please Connect to internet to run"
exit 1
fi
echo "Running Code"
./a.out
else
echo Python 3 is not installed
echo Python 3 is must to run the code
fi