summaryrefslogtreecommitdiffhomepage
path: root/build
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-09-02 09:38:28 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-09-02 09:39:24 +0200
commit6c72dec7e520bf9bef18b5db8656532278bcac26 (patch)
tree3d069322bf2ec935900b8209fac64005e8c67e4e /build
parentb96d223642ae93c9ae1679a0a0fb9ab368060e39 (diff)
build/makedocs.sh: handle relative output directories
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'build')
-rwxr-xr-xbuild/makedocs.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/build/makedocs.sh b/build/makedocs.sh
index a9fc760e7..955c58cf0 100755
--- a/build/makedocs.sh
+++ b/build/makedocs.sh
@@ -7,8 +7,15 @@ topdir=$(pwd)
exit 1
}
+outdir=$(readlink -f "$1")
+
+mkdir -p "$outdir" || {
+ echo "Unable to mkdir '$outdir'" >&2
+ exit 1
+}
+
(
cd "$topdir/build/luadoc/"
find "$topdir/libs/" "$topdir/modules/" -type f -name '*.lua' -or -name '*.luadoc' | \
- xargs grep -l '@return' | xargs ./doc.lua --no-files -d "$1"
+ xargs grep -l '@return' | xargs ./doc.lua --no-files -d "$outdir"
)