Skip to content

Commit

Permalink
Make sed work on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
japborst committed Sep 21, 2022
1 parent 49c4efb commit e9e37c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions generate-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ nav_order: 1
EOF

cat "README.md" >> ${HOMEPAGE}
sed -i '' 's/src="/src="assets\/images\//g' ${HOMEPAGE}
sed -i '' 's/srcset="/srcset="assets\/images\//g' ${HOMEPAGE}

SEDOPTION="-i"
if [[ "$OSTYPE" == "darwin"* ]]; then
SEDOPTION="-i .bak"
fi
sed $SEDOPTION 's/src="/src="assets\/images\//g' ${HOMEPAGE}
sed $SEDOPTION 's/srcset="/srcset="assets\/images\//g' ${HOMEPAGE}
}

generate_bugpattern_docs() {
Expand Down
1 change: 1 addition & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Gemfile.lock
_site/

# Generated content
*.bak
index.md
bugpatterns/
refastertemplates/

0 comments on commit e9e37c8

Please sign in to comment.