aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStaffan Olsson <staffan@repos.se>2017-07-29 07:25:14 +0200
committerStaffan Olsson <staffan@repos.se>2017-07-29 07:25:14 +0200
commit7a1173be5fbd5f334e4ffe96b33358ade933ea94 (patch)
treebff5ea3d81f70916cb89a0b5323ac44549f73785
parentbe0d1acebc87665f1619ee32e762bb2d70248297 (diff)
downloadkubernetes-kafka-7a1173be5fbd5f334e4ffe96b33358ade933ea94.tar.gz
kubernetes-kafka-7a1173be5fbd5f334e4ffe96b33358ade933ea94.tar.bz2
kubernetes-kafka-7a1173be5fbd5f334e4ffe96b33358ade933ea94.zip
Fixes the sed on OSX
-rwxr-xr-xprod-yolean.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/prod-yolean.sh b/prod-yolean.sh
index 8fc91e1..80cb893 100755
--- a/prod-yolean.sh
+++ b/prod-yolean.sh
@@ -9,7 +9,16 @@ function annotate {
key=$1
value=$2
file=$3
- sed -i "s| annotations:| annotations:\n ${ANNOTATION_PREFIX}$key: '$value'|" $file
+ case $(uname) in
+ Darwin*)
+ sed -i '' 's| annotations:| annotations:\
+ --next-annotation--|' $file
+ sed -i '' "s|--next-annotation--|${ANNOTATION_PREFIX}$key: '$value'|" $file
+ ;;
+ *)
+ sed -i "s| annotations:| annotations:\n ${ANNOTATION_PREFIX}$key: '$value'|" $file
+ ;;
+ esac
}
git fetch