Explorar o código

Fix headers with directories

Jeremy Soller %!s(int64=6) %!d(string=hai) anos
pai
achega
6418f893e4
Modificáronse 1 ficheiros con 8 adicións e 4 borrados
  1. 8 4
      include.sh

+ 8 - 4
include.sh

@@ -9,8 +9,12 @@ for config in src/header/*/cbindgen.toml
 do
     dir="$(dirname "$config")"
     name="$(basename "$dir")"
-    pushd "$dir"
-    cargo run --release --manifest-path "$cbindgen/Cargo.toml" -- \
-        -c cbindgen.toml -o "$include/$name.h" mod.rs
-    popd
+    if [ "${name:0:1}" != "_" ]
+    then
+        header="$include/${name/_/\/}.h"
+        pushd "$dir"
+        cargo run --release --manifest-path "$cbindgen/Cargo.toml" -- \
+            -c cbindgen.toml -o "$header" mod.rs
+        popd
+    fi
 done