From 0124e8c27231871465579429c3bf7a569ba9bcdb Mon Sep 17 00:00:00 2001
From: Max Leonard Inden <IndenML@gmail.com>
Date: Fri, 11 May 2018 11:23:10 +0200
Subject: [PATCH] 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.
---
 build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.sh b/build.sh
index cefa57e8..30e75852 100755
--- a/build.sh
+++ b/build.sh
@@ -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' -- {}
 
-- 
GitLab