From 47127d627a6967c12dfd96aa189d77f8b76d8bdc Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Sat, 14 Oct 2017 07:59:35 -0600
Subject: [PATCH] Run docgen when installing a package

---
 .gitmodules    | 7 +++----
 cook.sh        | 9 +++++++++
 docgen         | 1 +
 libc-artifacts | 1 -
 4 files changed, 13 insertions(+), 5 deletions(-)
 create mode 160000 docgen
 delete mode 160000 libc-artifacts

diff --git a/.gitmodules b/.gitmodules
index c335c458c..37d3c8bdd 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,8 +1,7 @@
-[submodule "libc-artifacts"]
-	path = libc-artifacts
-	url = https://github.com/redox-os/libc-artifacts.git
-	branch = master
 [submodule "pkgutils"]
 	path = pkgutils
 	url = https://github.com/redox-os/pkgutils.git
 	branch = master
+[submodule "docgen"]
+	path = docgen
+	url = https://github.com/redox-os/docgen.git
diff --git a/cook.sh b/cook.sh
index 6edce30b0..22ff58982 100755
--- a/cook.sh
+++ b/cook.sh
@@ -11,9 +11,15 @@ export DEBUG=
 
 if [ ! "$(uname -s)" = "Redox" ]
 then
+
 function pkg {
     CC=cc cargo run --release --manifest-path "$ROOT/pkgutils/Cargo.toml" --bin pkg -- $@
 }
+
+function docgen {
+    CC=cc cargo run --release --manifest-path "$ROOT/docgen/Cargo.toml" --bin docgen -- $@
+}
+
 fi
 
 function usage {
@@ -342,6 +348,7 @@ function op {
                 else
                     build=release
                 fi
+
                 bins="$(find target/$TARGET/$build/ -maxdepth 1 -type f ! -name '*.*')"
                 if [ -n "$bins" ]
                 then
@@ -356,6 +363,8 @@ function op {
                         fi
                     done
                 fi
+
+                docgen . ../stage/ref/
             fi
             popd > /dev/null
             ;;
diff --git a/docgen b/docgen
new file mode 160000
index 000000000..52fb8863e
--- /dev/null
+++ b/docgen
@@ -0,0 +1 @@
+Subproject commit 52fb8863efdd0862b2439f87faff2457b43cac62
diff --git a/libc-artifacts b/libc-artifacts
deleted file mode 160000
index c67b055af..000000000
--- a/libc-artifacts
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c67b055af98c5f9d3afbe62479e8201f01f941cc
-- 
GitLab