mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 13:57:36 -08:00
Make update-copy.sh work for both OSX and GNU sed
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
parent
660df3488d
commit
de28494434
|
@ -18,5 +18,10 @@ rm -rf ./prometheus/*_test.go
|
||||||
|
|
||||||
rm -rf ./tmp
|
rm -rf ./tmp
|
||||||
|
|
||||||
sed -i 's#github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus#github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheus#g' ./prometheusremotewrite/*.go
|
case $(sed --help 2>&1) in
|
||||||
sed -i '1s#^#// DO NOT EDIT. COPIED AS-IS. SEE ../README.md\n\n#g' ./prometheusremotewrite/*.go ./prometheus/*.go
|
*GNU*) set sed -i;;
|
||||||
|
*) set sed -i '';;
|
||||||
|
esac
|
||||||
|
|
||||||
|
"$@" -e 's#github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus#github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheus#g' ./prometheusremotewrite/*.go
|
||||||
|
"$@" -e '1s#^#// DO NOT EDIT. COPIED AS-IS. SEE ../README.md\n\n#g' ./prometheusremotewrite/*.go ./prometheus/*.go
|
||||||
|
|
Loading…
Reference in a new issue