-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_launch.sh
executable file
·41 lines (36 loc) · 992 Bytes
/
gen_launch.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
#!/bin/bash
i=0;
for function in "$@";
do
((i++));
done
echo "{"
echo " // Use IntelliSense to learn about possible attributes."
echo " // Hover to view descriptions of existing attributes."
echo " // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387"
echo " \"version\": \"0.2.0\","
echo " \"configurations\": ["
cat mainlaunch
for function in "$@"; do
echo " {"
echo " \"name\": \"clang - $function build and debug\","
echo " \"type\": \"cppdbg\","
echo " \"request\": \"launch\","
echo " \"program\": \"\${workspaceFolder}/libft-testset/_programs/$function/$function\","
echo " \"args\": [],"
echo " \"stopAtEntry\": false,"
echo " \"cwd\": \"\${workspaceFolder}\","
echo " \"environment\": [],"
echo " \"externalConsole\": false,"
echo " \"MIMode\": \"lldb\","
echo " \"preLaunchTask\": \"C/C++: clang build $function\""
((i--));
if ((i != 0)); then
echo " },"
else
echo " }"
fi
echo ""
done
echo " ]"
echo "}"