diff options
author | Androbin <robin.richtsfeld@gmail.com> | 2017-12-14 07:24:27 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-12-14 07:25:56 -0800 |
commit | ef381e54b124a7bb71dcb883fdc999f3bd37d4ed (patch) | |
tree | 47f8f0e98ccfb24460b7b1d389670838eb08620b /scripts/serve-docs.sh | |
parent | 1b66574799a242b09f88a1b0cfe47a956f17fa87 (diff) |
Shell code cleanup
- Argument mixes string and array. Use * or separate argument.
- Quote the grep pattern so the shell won't interpret it.
- Use "${var:?}" to ensure this never expands to /* .
- > is for string comparisons. Use -gt instead.
- Quote the parameter to -name so the shell won't interpret it.
Closes #4163.
PiperOrigin-RevId: 179042046
Diffstat (limited to 'scripts/serve-docs.sh')
-rwxr-xr-x | scripts/serve-docs.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/serve-docs.sh b/scripts/serve-docs.sh index f1dfbd5e18..c4541a84e0 100755 --- a/scripts/serve-docs.sh +++ b/scripts/serve-docs.sh @@ -41,7 +41,7 @@ EOF build_tree() { bazel build //site:jekyll-tree.tar - rm -rf $WORKING_DIR/* + rm -rf ${WORKING_DIR:-sentinel}/* tar -xf "$(bazel info bazel-genfiles)/site/jekyll-tree.tar" -C $WORKING_DIR } |