Skip to content

Commit

Permalink
Make it work on unix too
Browse files Browse the repository at this point in the history
  • Loading branch information
npresseault committed May 7, 2024
1 parent 23108e0 commit b34fe46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buildDocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -ex

if [[ "$OSTYPE" == "darwin"* ]]; then SEDOPTION='-i \x27\x27'; else SEDOPTION='-i'; fi;

DOCS_ROOT=build/docs

[ -d $DOCS_ROOT ] && rm -r $DOCS_ROOT
Expand All @@ -21,7 +23,5 @@ cp CHANGELOG.md $DOCS_ROOT/changelog.md
cp LICENSE.md $DOCS_ROOT/license.md
cp CODE_OF_CONDUCT.md $DOCS_ROOT/code-of-conduct.md

sed -i '' -e 's/LICENSE.md/license/' $DOCS_ROOT/index.md

# Convert docs/xxx.md links to just xxx/
sed -i '' -e 's/docs\/\([a-zA-Z-]*\).md/\1/' $DOCS_ROOT/index.md
sed $SEDOPTION -e 's/LICENSE.md/license/' $DOCS_ROOT/index.md
sed $SEDOPTION -e 's/docs\/\([a-zA-Z-]*\).md/\1/' $DOCS_ROOT/index.md

0 comments on commit b34fe46

Please sign in to comment.