[PATCH] D95284: utils/release: Add script for building release documentation
Luís Ferreira via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 27 13:12:57 PDT 2021
ljmf00 added a comment.
I left some comments :)
================
Comment at: llvm/utils/release/build-docs.sh:26
+builddir=docs-build
+srcdir=$(readlink -f $(dirname "$(readlink -f "$0")")/../..)
+
----------------
Use double quotes to prevent word split
================
Comment at: llvm/utils/release/build-docs.sh:31
+ echo "done for -final releases."
+ echo "usage: `basename $0`"
+ echo " "
----------------
Use `$(...)` instead of legacy backticks for subshell. Using backticks is limited to one level of subshell and make the rest of the code consistent.
================
Comment at: llvm/utils/release/build-docs.sh:45
+
+ mv $builddir/$proj_dir/docs/doxygen/html $output
+ tar -cJf $output.tar.xz $output
----------------
Double quotes
================
Comment at: llvm/utils/release/build-docs.sh:69
+
+if [ -n "$release" -a -n "$custom_srcdir" ]; then
+ echo "error: Cannot specify both -srcdir and -release options"
----------------
POSIX `test` is not so well defined to allow these XSI extensions in a reliable way. Read this for context: https://github.com/koalaman/shellcheck/wiki/SC2166
================
Comment at: llvm/utils/release/build-docs.sh:86
+ mkdir -p llvm-project
+ pushd llvm-project
+ curl -L https://github.com/llvm/llvm-project/archive/$git_ref.tar.gz | tar --strip-components=1 -xzf -
----------------
`pushd` and `popd` is not POSIX compliant and are only available via bash, not sh.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95284/new/
https://reviews.llvm.org/D95284
More information about the llvm-commits
mailing list