mirror of
https://github.com/bazel-contrib/bazel-lib
synced 2024-11-27 17:43:27 +00:00
20 lines
530 B
Bash
Executable file
20 lines
530 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -o errexit -o nounset
|
|
|
|
expected_file="$1"
|
|
source_file="$2"
|
|
bin_file="$3"
|
|
if [[ "$expected_file" != "$source_file" ]]; then
|
|
echo "ERROR: expected source_file to be $expected_file, but got $source_file"
|
|
exit 1
|
|
fi
|
|
if [[ "$bin_file" != "bazel-out/"* ]]; then
|
|
echo "ERROR: expected bin_file to be start with bazel-out/, but got $bin_file"
|
|
exit 1
|
|
fi
|
|
if [[ "$bin_file" != *"/bin/$expected_file" ]]; then
|
|
echo "ERROR: expected bin_file to be end with /bin/$expected_file, but got $bin_file"
|
|
exit 1
|
|
fi
|