1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 03:38:43 +00:00

contrib/kube-prometheus: add -f to rm in build.sh

According to the man pages of `rm` and the `-f` option:
> Attempt to remove the files without prompting for confirma- tion,
> regardless of the file's permissions.  If the file does not exist, do
> not display a diagnostic message or modify the exit status to reflect an
> error.  The -f option overrides any previous -i options.

This patch prevents the `build.sh` script from failing if files do not
exist when attempting to delete them.
This commit is contained in:
Max Leonard Inden 2018-05-11 11:23:10 +02:00
parent 3a4da27c68
commit e432d8241d
No known key found for this signature in database
GPG key ID: 5403C5464810BC26

View file

@ -3,5 +3,5 @@ set -e
set -x
# optional, but we would like to generate yaml, not json
jsonnet -J vendor -m manifests example.jsonnet | xargs -I{} sh -c 'cat $1 | gojsontoyaml > $1.yaml; rm $1' -- {}
jsonnet -J vendor -m manifests example.jsonnet | xargs -I{} sh -c 'cat $1 | gojsontoyaml > $1.yaml; rm -f $1' -- {}