Skip to content

Commit 881ee2d

Browse files
authored
Merge pull request #35 from pengzhisun/master
replace '\s' to [[:space:]] for supporting macos
2 parents ea18a33 + 6de64bb commit 881ee2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deploy/util/deploy-hostpath.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort); do
105105
echo " $i"
106106
modified="$(cat "$i" | while IFS= read -r line; do
107107
nocomments="$(echo "$line" | sed -e 's/ *#.*$//')"
108-
if echo "$nocomments" | grep -q '^\s*image:\s*'; then
108+
if echo "$nocomments" | grep -q '^[[:space:]]*image:[[:space:]]*'; then
109109
# Split 'image: quay.io/k8scsi/csi-attacher:v1.0.1'
110110
# into image (quay.io/k8scsi/csi-attacher:v1.0.1),
111111
# registry (quay.io/k8scsi),
112112
# name (csi-attacher),
113113
# tag (v1.0.1).
114-
image=$(echo "$nocomments" | sed -e 's;.*image:\s*;;')
114+
image=$(echo "$nocomments" | sed -e 's;.*image:[[:space:]]*;;')
115115
registry=$(echo "$image" | sed -e 's;\(.*\)/.*;\1;')
116116
name=$(echo "$image" | sed -e 's;.*/\([^:]*\).*;\1;')
117117
tag=$(echo "$image" | sed -e 's;.*:;;')

0 commit comments

Comments
 (0)