File tree Expand file tree Collapse file tree 3 files changed +35
-24
lines changed
Expand file tree Collapse file tree 3 files changed +35
-24
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ DerivedData/
88.netrc
99coverage.txt
1010TODO.md
11- template.swiftinterface
11+ .ag_template /
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/zsh
2+
3+ # A `realpath` alternative using the default C implementation.
4+ filepath () {
5+ [[ $1 = /* ]] && echo " $1 " || echo " $PWD /${1# ./ } "
6+ }
7+
8+ gen_interface () {
9+ swift build -c release -Xswiftc -emit-module-interface -Xswiftc -enable-library-evolution -Xswiftc -no-verify-emitted-module-interface -Xswiftc -package-name -Xswiftc OpenGraph -Xswiftc -Osize
10+
11+ mkdir -p .ag_template
12+ cp .build/release/Modules/OpenGraph.swiftinterface .ag_template/template.swiftinterface
13+
14+ sed -i ' ' ' 1,4d' .ag_template/template.swiftinterface
15+ sed -i ' ' ' s/@_exported public import OpenGraphCxx/@_exported public import AttributeGraph/g' .ag_template/template.swiftinterface
16+ sed -i ' ' ' s/OpenGraphCxx\.//g' .ag_template/template.swiftinterface
17+ sed -i ' ' ' s/OpenGraph/AttributeGraph/g' .ag_template/template.swiftinterface
18+ sed -i ' ' ' s/OPENGRAPH/ATTRIBUTEGRAPH/g' .ag_template/template.swiftinterface
19+ sed -i ' ' ' s/OG/AG/g' .ag_template/template.swiftinterface
20+
21+ echo " Generated template.swiftinterface successfully"
22+ }
23+
24+ gen_header () {
25+ # TODO: Implement header generation
26+ echo " Generated template header successfully"
27+ }
28+
29+ OPENGRAPH_ROOT=" $( dirname $( dirname $( filepath $0 ) ) ) "
30+
31+ cd $OPENGRAPH_ROOT
32+
33+ gen_interface
34+ gen_header
You can’t perform that action at this time.
0 commit comments