forked from Electrostat-Lab/AVR-Sandbox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
launch-sandbox-setup.sh
executable file
·114 lines (83 loc) · 3.2 KB
/
launch-sandbox-setup.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
source setup-sanbox.sh
source CommonVariables.sh
confirmDownload
setupAvrDude
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@SetupAvrDude : Failed setting up avrdude, check your connection and your storage"
exit $?
else
echo -e "${GREEN_C} --MajorTask@SetupAvrDude : avrdude Successfully settled up and ready to run."
fi
echo -e ${RESET_Cs}
setupCURL
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@SetupCURL : Failed setting up CURL, check your connection and your storage"
exit $?
else
echo -e "${GREEN_C} --MajorTask@SetupCURL : Curl Successfully settled up and ready to run."
fi
echo -e ${RESET_Cs}
downloadAvrToolChain
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@Download-AvrGCC : Failed downloading avr toolchains, check your connection and your storage."
exit $?
else
echo -e "${GREEN_C} --MajorTask@Download-AvrGCC : Avr toolchains archive is downloaded successfully."
fi
echo -e ${RESET_Cs}
extractCompressedFile $avrgcc_compressed
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@Extract-AvrGCC : Failed extracting avr toolchains, check your storage and your permssions."
exit $?
else
echo -e "${GREEN_C} --MajorTask@Extract-AvrGCC : Avr toolchains is extracted successfully."
fi
echo -e ${RESET_Cs}
downloadJdk
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@Download-JDK-19 : Failed downloading jdk-19, check your storage and your permissions."
exit $?
else
echo -e "${GREEN_C} --MajorTask@Download-JDK-19 : jdk-19 archive is downloaded successfully."
fi
echo -e ${RESET_Cs}
extractCompressedFile $jdk_compressed
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@Extract-JDK-19 : Failed extracting jdk-19 archive, check your storage and your permissions."
exit $?
else
echo -e "${GREEN_C} --MajorTask@Extract-JDK-19 : jdk-19 archive toolchains successfully extracted."
fi
echo -e ${RESET_Cs}
deleteAvrToolchainsArchive
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@Release-AVR-GCC-Archive : Failed deleting avr-gcc archive, archive not found."
exit $?
else
echo -e "${GREEN_C} --MajorTask@Release-AVR-GCC-Archive : AVR-GCC archive has been deleted successfully."
fi
echo -e ${RESET_Cs}
deleteJdkArchive
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@Release-JDK-19-Archive : Failed deleting jdk-19 archive, archive not found."
exit $?
else
echo -e "${GREEN_C} --MajorTask@Release-JDK-19-Archive : jdk-19 archive has been deleted successfully."
fi
echo -e ${RESET_Cs}
provokeReadWriteExecutePermissions './avr8-gnu-toolchain-linux_x86_64'
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@Provoke-Permissions-AVR-GCC : Failed to provoke permissions, file not found or you aren't [root]."
exit $?
else
echo -e "${GREEN_C} --MajorTask@Provoke-Permissions-AVR-GCC : R/W/E Permssions are provoked successfully."
fi
echo -e ${RESET_Cs}
provokeReadWriteExecutePermissions './jdk-19'
if [[ $? -gt 0 ]]; then
echo -e "${RED_C} --MajorTask@Provoke-Permissions-JDK-19 : Failed to provoke permissions, file not found or you aren't [root]."
exit $?
else
echo -e "${GREEN_C} --MajorTask@Provoke-Permissions-JDK-19 : R/W/E Permssions are provoked successfully."
fi
echo -e ${RESET_Cs}