Replace sed_hyphen_i() with portable implementation (#8935)
This commit is contained in:
parent
e184562ea5
commit
53a60aedd3
11
configure
vendored
11
configure
vendored
@ -35,12 +35,9 @@ function is_windows() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function sed_hyphen_i() {
|
function sed_in_place() {
|
||||||
if is_macos; then
|
sed -e $1 $2 > "$2.bak"
|
||||||
sed -i '' "$@"
|
mv "$2.bak" $2
|
||||||
else
|
|
||||||
sed -i "$@"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function write_to_bazelrc() {
|
function write_to_bazelrc() {
|
||||||
@ -170,7 +167,7 @@ function setup_python {
|
|||||||
rm -f .tf_configure.bazelrc
|
rm -f .tf_configure.bazelrc
|
||||||
touch .tf_configure.bazelrc
|
touch .tf_configure.bazelrc
|
||||||
touch .bazelrc
|
touch .bazelrc
|
||||||
sed_hyphen_i "/tf_configure/d" .bazelrc
|
sed_in_place "/tf_configure/d" .bazelrc
|
||||||
echo "import %workspace%/.tf_configure.bazelrc" >> .bazelrc
|
echo "import %workspace%/.tf_configure.bazelrc" >> .bazelrc
|
||||||
|
|
||||||
# Delete any leftover BUILD files from the Makefile build, which would interfere
|
# Delete any leftover BUILD files from the Makefile build, which would interfere
|
||||||
|
Loading…
Reference in New Issue
Block a user