swiftlang / swift-docc-render

Web renderer for Swift-DocC documentation.
Apache License 2.0
315 stars 53 forks source link

Use bash for scripts instead of sh #888

Closed mportiz08 closed 3 months ago

mportiz08 commented 3 months ago

Bug/issue #, if applicable:

Summary

This fixes a minor issue with some scripts in bin/ that use the shebang line #!/usr/bin/env sh.

When running on a system with an actual sh implementation, these scripts fail due to a syntax issue with the function keyword (apparently a bash specific thing). This is easy to miss on platforms where sh is just a link to bash, so using bash will ensure that the scripts work without changes on all platforms.

Testing

Steps:

  1. Run npm run docs to exercise all these scripts and ensure they are still functional.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

mportiz08 commented 3 months ago

@swift-ci test