File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed 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
+ OPENGRAPH_ROOT=" $( dirname $( dirname $( filepath $0 ) ) ) "
9
+
10
+ cd $OPENGRAPH_ROOT
11
+
12
+ # Build the swiftinterface file
13
+ ./Scripts/build_swiftinterface.sh
14
+
15
+ # Copy to template file
16
+ cp .build/debug/OpenGraph.build/OpenGraph.swiftinterface ./template.swiftinterface
17
+
18
+ # Process the template file
19
+ # 1. Remove the first 5 lines
20
+ # 2. Remove all references of "OpenGraph_SPI."
21
+ # 3. Replace all references of "OpenGraph" to "AttributeGraph"
22
+ # 4. Replace all references of "OG" to "AG"
23
+ sed -i ' ' ' 1,5d' ./template.swiftinterface
24
+ sed -i ' ' ' s/OpenGraph_SPI\.//g' ./template.swiftinterface
25
+ sed -i ' ' ' s/OpenGraph/AttributeGraph/g' ./template.swiftinterface
26
+ sed -i ' ' ' s/OG/AG/g' ./template.swiftinterface
27
+
28
+ echo " Generated template.swiftinterface successfully"
29
+
You can’t perform that action at this time.
0 commit comments