Skip to content

Commit

Permalink
Merge pull request #19 from pharmaverse/format-sh
Browse files Browse the repository at this point in the history
Format shell scripts
  • Loading branch information
nanxstats authored Jan 24, 2025
2 parents e9b1c3f + e5f5538 commit 2a587fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/scripts/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ sync_article() {
python -m nbconvert --to python "docs/articles/$article_name.ipynb" --output "../../$example_output"

# Remove all comments
awk '!/^#/' "$example_output" > temp && mv temp "$example_output"
awk '!/^#/' "$example_output" >temp && mv temp "$example_output"

# Consolidate consecutive blank lines into a single blank line
awk 'NF {p = 0} !NF {p++} p < 2' "$example_output" > temp && mv temp "$example_output"
awk 'NF {p = 0} !NF {p++} p < 2' "$example_output" >temp && mv temp "$example_output"

# Clean up
rm "docs/articles/$article_name.ipynb"
Expand All @@ -35,7 +35,7 @@ for article in get-started; do
done

# Sync README.md with modified image path for docs/index.md
awk '{gsub("docs/assets/logo.png", "assets/logo.png"); print}' README.md > docs/index.md
awk '{gsub("docs/assets/logo.png", "assets/logo.png"); print}' README.md >docs/index.md

# Sync CHANGELOG.md with docs/changelog.md
cp CHANGELOG.md docs/changelog.md

0 comments on commit 2a587fd

Please sign in to comment.