Skip to content

Commit 031bda7

Browse files
change sed delimiter to allow slashes in strings (#23)
1 parent 9b93bd7 commit 031bda7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/scripts/create_category_json.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ CreateCategoryJSON() {
1010
# shellcheck disable=SC2016
1111
TEMPLATE='{
1212
"label": "${LABEL}",
13-
"link": {
14-
"type": "generated-index",
15-
"title": "${LABEL}"
16-
},
13+
"link": null,
1714
"customProps": {
1815
"description": "${DESCRIPTION}",
1916
"projectName": "${PROJECT_NAME}",
@@ -26,9 +23,9 @@ CreateCategoryJSON() {
2623

2724
# Substitute the variables in the template and write to target location
2825
echo "$TEMPLATE" | sed \
29-
-e "s/\${LABEL}/$LABEL/g" \
30-
-e "s/\${DESCRIPTION}/$DESCRIPTION/g" \
31-
-e "s/\${PROJECT_NAME}/$PROJECT_NAME/g" \
26+
-e "s|\${LABEL}|$LABEL|g" \
27+
-e "s|\${DESCRIPTION}|$DESCRIPTION|g" \
28+
-e "s|\${PROJECT_NAME}|$PROJECT_NAME|g" \
3229
> "$TARGET_REPO_DIRECTORY/docs/$PROJECT_NAME/_category_.json"
3330

3431
echo "_category_.json file created successfully."

0 commit comments

Comments
 (0)