Commit 605b8ede authored by Joe Loser's avatar Joe Loser Committed by Facebook Github Bot

Fix shellcheck warnings on docker_build_with_ccache.sh (#1054)

Summary:
- Fix a few shellcheck warnings on `docker_build_with_ccache.sh`.
- This will help when new changes are made to this script as
  shellcheck is run internally.
Pull Request resolved: https://github.com/facebook/folly/pull/1054

Reviewed By: yns88

Differential Revision: D14454554

Pulled By: yfeldblum

fbshipit-source-id: f4b692f21d2478f9db06b478ce56c1ba57fa59e0
parent 33421a75
......@@ -66,7 +66,7 @@ if [[ "$build_timeout" != "" ]] ; then
echo "Build timed out after $build_timeout" 1>&2
while true; do
maybe_container=$(
egrep '^( ---> Running in [0-9a-f]+|FBCODE_BUILDER_EXIT)$' "$logfile" |
grep -E '^( ---> Running in [0-9a-f]+|FBCODE_BUILDER_EXIT)$' "$logfile" |
tail -n 1 | awk '{print $NF}'
)
if [[ "$maybe_container" == "FBCODE_BUILDER_EXIT" ]] ; then
......@@ -109,7 +109,7 @@ if [[ "$img" == "" ]] ; then
# the build command itself, but since our builds aren't **trying** to
# break cache, we probably won't randomly hit an ID from another build.
img=$(
egrep '^ ---> (Running in [0-9a-f]+|[0-9a-f]+)$' "$logfile" | tac |
grep -E '^ ---> (Running in [0-9a-f]+|[0-9a-f]+)$' "$logfile" | tac |
sed 's/Running in /container_/;s/ ---> //;' | (
while read -r x ; do
# Both docker commands below print an image ID to stdout on
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment