Skip to content

Commit 6d4ad82

Browse files
committed
use 'sed -i.bak' instead of 'sed -i' to make it compatible with macos sed
1 parent 489f6e2 commit 6d4ad82

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ kustomize
1111

1212
# Output of the go coverage tool, specifically when used with LiteIDE
1313
*.out
14+
15+
# We use sed -i.bak when doing in-line replace, because it works better cross-platform
16+
.bak

examples/configGeneration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ the server will use:
164164
165165
<!-- @changeMap @test -->
166166
```
167-
sed -i 's/pineapple/kiwi/' $OVERLAYS/staging/map.yaml
167+
sed -i.bak 's/pineapple/kiwi/' $OVERLAYS/staging/map.yaml
168168
```
169169
170170
See the new greeting:

examples/helloWorld/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,10 @@ label_ applied to all resources:
108108
109109
<!-- @addLabel @test -->
110110
```
111-
sed -i 's/app: hello/app: my-hello/' \
111+
sed -i.bak 's/app: hello/app: my-hello/' \
112112
$BASE/kustomization.yaml
113113
```
114114
115-
On a Mac, use:
116-
```
117-
sed -i '' $pattern $file
118-
```
119-
to get in-place editing.
120-
121115
See the effect:
122116
<!-- @checkLabel @test -->
123117
```

examples/mySql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ a label, but one can always edit `kustomization.yaml` directly:
136136
137137
<!-- @customizeLabels @test -->
138138
```
139-
sed -i 's/app: helloworld/app: prod/' \
139+
sed -i.bak 's/app: helloworld/app: prod/' \
140140
$DEMO_HOME/kustomization.yaml
141141
```
142142

0 commit comments

Comments
 (0)