neo_doxygen: Add shell scripts to help integration testing.
authorJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Fri, 24 Oct 2014 14:33:41 +0000 (10:33 -0400)
committerJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Tue, 4 Nov 2014 17:14:12 +0000 (12:14 -0500)
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

contrib/neo_doxygen/gen-all.sh [new file with mode: 0755]
contrib/neo_doxygen/gen-one.sh [new file with mode: 0755]

diff --git a/contrib/neo_doxygen/gen-all.sh b/contrib/neo_doxygen/gen-all.sh
new file mode 100755 (executable)
index 0000000..bb7835a
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/bash
+
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# ./gen-all.sh directory
+#
+# Document all projects in the specified directory.
+#
+# Projects are direct sub-directories of the specified directory.
+# Every project directory must contain a `.nx_config` file.
+# Also, every project must include the Doxygen XML output in its `doxygen/xml`
+# directory.
+
+NEO_DOXYGEN="${PWD}/bin/neo_doxygen"
+NX="${PWD}/../../bin/nx"
+
+for dir in "$1"/*; do
+       if [ -d "$dir" ]; then
+               if [ -f "$dir/.nx_config" ]; then
+                       ./gen-one.sh $dir
+               fi
+       fi
+done
diff --git a/contrib/neo_doxygen/gen-one.sh b/contrib/neo_doxygen/gen-one.sh
new file mode 100755 (executable)
index 0000000..86f5925
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/bash
+
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# ./gen-one.sh directory
+#
+# Document the project in the specified directory.
+#
+# The project name is the basename of the specified directory.
+# The project directory must contain a `.nx_config` file.
+# Also, the directory must include the Doxygen XML output in its `doxygen/xml`
+# subdirectory.
+
+NEO_DOXYGEN="${PWD}/bin/neo_doxygen"
+NX="${PWD}/../../bin/nx"
+dir=$1
+
+echo "$0: Documenting \"${dir##*/}\"..."
+pushd "$dir"
+"$NEO_DOXYGEN" "${dir##*/}" "$dir/doxygen/xml" http://localhost:7474 > neo_doxygen.out \
+&& echo "$0: [done] neo_doxygen" \
+&& "$NX" neo doc "${dir##*/}" \
+&& echo "$0: [done] nx"
+popd