I saw this question was raised in 2015 here. Though the suggestion was to use the Run a Script, this in not feasible when there is a need for reusable functions.
Though such functions/scripts can be included via a Reference Package in a Step Template, the issue then is that for every Process using such Step Templates, a Release needs to Reference Package version as input (this causes complications when, e.g., a Release needs to be dynamically created via API call and then Reference Package version also becomes mandatory input).
If bash scripts containing functions (basically library-type scripts) are supported as Script Modules, then the above issues can be largely mitigated without having to copy/paste functions everywhere (making updates/changes painful) or having to deal with Reference Package related complications.