-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcreateCodeBlocksProject.sh
More file actions
executable file
·48 lines (42 loc) · 1.07 KB
/
Copy pathcreateCodeBlocksProject.sh
File metadata and controls
executable file
·48 lines (42 loc) · 1.07 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
#!/bin/bash
INPUTPARAMS=$@
PRJNAME=`pwd`
PRJNAME=`basename $PRJNAME`
# header of project file
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>
<CodeBlocks_project_file>
<FileVersion major=\"1\" minor=\"6\" />
<Project>
<Option title=\"$PRJNAME\" />
<Option makefile_is_custom=\"1\" />
<Option pch_mode=\"2\" />
<Option compiler=\"gcc\" />
<Build>
<Target title=\"clean\">
<Option type=\"4\" />
<Option compiler=\"gcc\" />
</Target>
<Target title=\""$PRJNAME"_wave\">
<Option type=\"4\" />
<Option compiler=\"gcc\" />
</Target>
</Build>
<Compiler>
<Add option=\"-Wall\" />
</Compiler>" > "$PRJNAME".cbp
# add every file to project
for file in $INPUTPARAMS; do
echo " <Unit filename=\""$file"\" />" >> "$PRJNAME".cbp
done
#add Makefile to Project:
echo " <Unit filename=\"Makefile\">
<Option target=\"<{~None~}>\" />
</Unit>" >> "$PRJNAME".cbp
#end of prj-file
echo " <Extensions>
<code_completion />
<debugger />
<envvars />
</Extensions>
</Project>
</CodeBlocks_project_file>" >> "$PRJNAME".cbp