From 9ddef840b665bd94a49102a4e3dbc433f7b29b9a Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 9 Jan 2014 14:39:48 -0800 Subject: chore(build): add relase-after-cdn script --- scripts/utils.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/utils.inc') diff --git a/scripts/utils.inc b/scripts/utils.inc index 3b0039ed..00213628 100644 --- a/scripts/utils.inc +++ b/scripts/utils.inc @@ -202,7 +202,12 @@ function readJsonProp { # - note: propertyRegex will be automatically placed into a # capturing group! -> all other groups start at index 2! function replaceJsonProp { - sed -i .tmp -E 's/"('$2')"[ ]*:[ ]*"'$3'"/"\1": "'$4'"/' $1 + replaceInFile $1 '"('$2')"[ ]*:[ ]*"'$3'"' '"\1": "'$4'"' +} + +# replaceInFile(file, findPattern, replacePattern) +function replaceInFile { + sed -i .tmp -E "s/$2/$3/" $1 rm $1.tmp } -- cgit v1.2.3