Skip to content

Commit 647514f

Browse files
committed
Use -i flag for sed to work across different versions
1 parent c0017d8 commit 647514f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/quickstart-for-gke.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ read STORAGE_CLASS
115115
echo ""
116116
echo "Setting up pgo storage configuration for the selected storageclass..." | tee -a $LOG
117117
cp $COROOT/examples/pgo.yaml.storageclass $COROOT/conf/apiserver/pgo.yaml
118-
sed --in-place=.bak 's/standard/'"$STORAGE_CLASS"'/' $COROOT/conf/apiserver/pgo.yaml
119-
sed --in-place=.bak 's/demo/'"$NAMESPACE"'/' $COROOT/deploy/service-account.yaml
120-
sed --in-place=.bak 's/demo/'"$NAMESPACE"'/' $COROOT/deploy/rbac.yaml
118+
sed -i .bak 's/standard/'"$STORAGE_CLASS"'/' $COROOT/conf/apiserver/pgo.yaml
119+
sed -i .bak 's/demo/'"$NAMESPACE"'/' $COROOT/deploy/service-account.yaml
120+
sed -i .bak 's/demo/'"$NAMESPACE"'/' $COROOT/deploy/rbac.yaml
121121

122122
echo ""
123123
echo "Setting up pgo client authentication..." | tee -a $LOG

examples/quickstart-for-ocp.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ read STORAGE_CLASS
118118
echo ""
119119
echo "Setting up pgo storage configuration for the selected storageclass..." | tee -a $LOG
120120
cp $COROOT/examples/pgo.yaml.storageclass $COROOT/conf/apiserver/pgo.yaml
121-
sed --in-place=.bak 's/standard/'"$STORAGE_CLASS"'/' $COROOT/conf/apiserver/pgo.yaml
122-
sed --in-place=.bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/service-account.yaml
123-
sed --in-place=.bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/rbac.yaml
121+
sed -i .bak 's/standard/'"$STORAGE_CLASS"'/' $COROOT/conf/apiserver/pgo.yaml
122+
sed -i .bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/service-account.yaml
123+
sed -i .bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/rbac.yaml
124124

125125
echo ""
126126
echo -n "Storage classes can require a fsgroup setting to be specified in the security context of your pods. Typically, this value is 26, but on some storage providers this value is blank. Enter your fsgroup setting if required or leave blank if not required: "
127127
read FSGROUP
128-
sed --in-place=.bak 's/26/'"$FSGROUP"'/' $COROOT/conf/apiserver/pgo.yaml
128+
sed -i .bak 's/26/'"$FSGROUP"'/' $COROOT/conf/apiserver/pgo.yaml
129129

130130
echo ""
131131
echo "Setting up pgo client authentication..." | tee -a $LOG

0 commit comments

Comments
 (0)