aboutsummaryrefslogtreecommitdiffhomepage
path: root/compile.sh
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2016-12-05 17:25:21 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-12-06 12:03:59 +0000
commit161c4a34c893bf8e25af00c18e95576bc2f82b5a (patch)
tree01ca7fcacf90bd221ad4aeca72ba1822fdac6d90 /compile.sh
parent3fd5d398890f27cdfbb39eac063c1418fe6f1285 (diff)
Always pass -e; some versions of sed give an error message otherwise.
Maybe fixes #1552. Closes #2175. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2175 PiperOrigin-RevId: 141060731 MOS_MIGRATED_REVID=141060731
Diffstat (limited to 'compile.sh')
-rwxr-xr-xcompile.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/compile.sh b/compile.sh
index c9aa36439c..dfc3d71015 100755
--- a/compile.sh
+++ b/compile.sh
@@ -143,7 +143,7 @@ if [ $DO_SRCS_TEST ]; then
log "Querying //:srcs"
${BAZEL} query 'kind("source file", deps(//:srcs))' 2>/dev/null \
| grep -v '^@' \
- | sed -e 's|^//||' | sed 's|^:||' | sed 's|:|/|' \
+ | sed -e 's|^//||' | sed -e 's|^:||' | sed -e 's|:|/|' \
| sort -u >"${OUTPUT_DIR}/srcs-query"
log "Finding all files"
@@ -152,7 +152,7 @@ if [ $DO_SRCS_TEST ]; then
SRCS_EXCLUDES=${SRCS_EXCLUDES-XXXXXXXXXXXXXX1268778dfsdf4}
# See file BUILD for the list of grep -v exceptions.
# tools/defaults package is hidden by Bazel so cannot be put in the srcs.
- find . -type f | sed 's|./||' \
+ find . -type f | sed -e 's|./||' \
| grep -v '^bazel-' | grep -v '^WORKSPACE.user.bzl' \
| grep -v '^\.' | grep -v '^out/' | grep -v '^output/' \
| grep -v '^derived' \
@@ -161,7 +161,7 @@ if [ $DO_SRCS_TEST ]; then
| sort -u >"${OUTPUT_DIR}/srcs-find"
log "Diffing"
- res="$(diff -U 0 "${OUTPUT_DIR}/srcs-find" "${OUTPUT_DIR}/srcs-query" | sed 's|^-||' | grep -Ev '^(@@|\+\+|--)' || true)"
+ res="$(diff -U 0 "${OUTPUT_DIR}/srcs-find" "${OUTPUT_DIR}/srcs-query" | sed -e 's|^-||' | grep -Ev '^(@@|\+\+|--)' || true)"
if [ -n "${res}" ]; then
fail "//:srcs filegroup do not contains all the sources, missing: