Skip to content

Commit cb79468

Browse files
authored
fix: make again script runnable on Mac OSX (#3125)
Signed-off-by: tarilabs <matteo.mortari@gmail.com>
1 parent ee9ff55 commit cb79468

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/library.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ update_readme() {
7878
local source_text="$2"
7979
local destination_text="$3"
8080

81-
sed -i "s|$source_text|$destination_text|g" "${manifests_directory}/README.md"
81+
if [[ "$OSTYPE" == "darwin"* ]]; then
82+
sed -i "" "s|$source_text|$destination_text|g" "${manifests_directory}/README.md" # BSD sed of Mac OSX
83+
else
84+
sed -i "s|$source_text|$destination_text|g" "${manifests_directory}/README.md" # GNU sed of Linux
85+
fi
8286
}
8387

8488
# Commit changes to git repository

0 commit comments

Comments
 (0)