-
Notifications
You must be signed in to change notification settings - Fork 0
/
axon.sh
executable file
·59 lines (52 loc) · 1.5 KB
/
axon.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
case "$1" in
# ---------------Create---------------
"create")
mkdir $2;
cd $2;
case "$3" in
#-----C++-----
"cpp")
touch main.cpp;
touch build.sh;
chmod +x build.sh;
echo "echo \"<<-COMPILING->>\";
case \$1 in
a)
g++ -O1 -Wall -fuse-ld=lld -std=c++20 -fsanitize=address -fno-omit-frame-pointer main.cpp;;
m)
g++ -O1 -Wall -fuse-ld=lld -std=c++20 -fsanitize=memory -fPIE -pie -fno-omit-frame-pointer -fno-optimize-sibling-calls -g main.cpp;;
t)
g++ -O1 -Wall -fuse-ld=lld -std=c++20 -fsanitize=thread -fPIE -pie -g main.cpp;;
l)
g++ -O1 -Wall -fuse-ld=lld -std=c++20 -fsanitize=leak main.cpp;;
u)
g++ -O1 -Wall -fuse-ld=lld -std=c++20 -fsanitize=undefined main.cpp;;
*)
g++ -Ofast -Wall -fuse-ld=lld -std=c++20 main.cpp;;
esac
echo \"<<-EXECUTING->>\";
./a.out;" > build.sh;;
#-----Java-----
"java")
touch Main.java;
touch build.sh;
chmod +x build.sh;
echo "echo \"<<-COMPILING->>\";
javac Main.java;
echo \"<<-EXECUTING->>\";
java Main;" > build.sh;;
#-----Python-----
"python")
touch main.py;
touch build.sh;
chmod +x build.sh;
echo "echo \"<<-EXECUTING->>\";
python main.py;" > build.sh;;
#-----Invalid-----
*)
echo "Invalid Argument";;
esac;;
# ---------------Build---------------
"build")
./build.sh $2;;
esac