From 7a1173be5fbd5f334e4ffe96b33358ade933ea94 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Sat, 29 Jul 2017 07:25:14 +0200 Subject: Fixes the sed on OSX --- prod-yolean.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3