Merge lp:~thedac/charms/precise/errors/fix-seds into lp:~daisy-pluckers/charms/precise/errors/trunk

Proposed by David Ames
Status: Merged
Merged at revision: 35
Proposed branch: lp:~thedac/charms/precise/errors/fix-seds
Merge into: lp:~daisy-pluckers/charms/precise/errors/trunk
Diff against target: 21 lines (+2/-2)
1 file modified
hooks/common (+2/-2)
To merge this branch: bzr merge lp:~thedac/charms/precise/errors/fix-seds
Reviewer Review Type Date Requested Status
Daisy Pluckers Pending
Review via email: mp+211353@code.launchpad.net

Description of the change

Fix *_settings seds to be more robust. It was missing key='' entries

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/common'
2--- hooks/common 2014-03-10 23:53:55 +0000
3+++ hooks/common 2014-03-17 16:12:29 +0000
4@@ -32,7 +32,7 @@
5 if ! grep -qs "$key" $LOCAL_CONFIG_PATH; then
6 echo "$key = '$value'" >> $LOCAL_CONFIG_PATH
7 else
8- sed -i "s,$key = .*,$key = '$value'," $LOCAL_CONFIG_PATH
9+ sed -r -i "s,$key ?=.*,$key = '$value'," $LOCAL_CONFIG_PATH
10 fi
11 }
12
13@@ -41,7 +41,7 @@
14 if ! grep -qs "cassandra_hosts" $LOCAL_CONFIG_PATH; then
15 echo "cassandra_hosts = ['$value']" >> $LOCAL_CONFIG_PATH
16 else
17- sed -i "s/cassandra_hosts = .*/cassandra_hosts = [$value]/" \
18+ sed -r -i "s/cassandra_hosts ?=.*/cassandra_hosts = [$value]/" \
19 $LOCAL_CONFIG_PATH
20 fi
21 }

Subscribers

People subscribed via source and target branches

to all changes: