X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=build%2Fmakedocs.sh;h=955c58cf0e29780c2c0b90658c4ccbeccfe0c2b9;hp=a9fc760e7a1ef0565c6b079315d58e0183cc6e6d;hb=46a2b5ebeaad5c1702e95970cc74dfad0690fa6d;hpb=c669c01cea36ce09b64a53dc0e597d27411e9c88 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" )