aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/utils.inc
diff options
context:
space:
mode:
authorTobias Bosch2014-01-09 14:39:48 -0800
committerTobias Bosch2014-01-09 14:59:55 -0800
commit9ddef840b665bd94a49102a4e3dbc433f7b29b9a (patch)
tree68baa133bd27fde473bd700c15532ca26347cf5f /scripts/utils.inc
parent28fc80bba0107075ab371fd0a7634a38891626b2 (diff)
downloadangular.js-9ddef840b665bd94a49102a4e3dbc433f7b29b9a.tar.bz2
chore(build): add relase-after-cdn script
Diffstat (limited to 'scripts/utils.inc')
-rw-r--r--scripts/utils.inc7
1 files changed, 6 insertions, 1 deletions
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
}