From 6418f893e44bc2c9a26405865a2f2ff80a62e76a Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jeremy@system76.com>
Date: Sun, 26 Aug 2018 12:40:19 -0600
Subject: [PATCH] Fix headers with directories

---
 include.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/include.sh b/include.sh
index b9b7cc156..82f7f8a52 100755
--- a/include.sh
+++ b/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
-- 
GitLab