TOOL-11892 Bulk modify of shebang lines to use /usr/bin/env#179
TOOL-11892 Bulk modify of shebang lines to use /usr/bin/env#1791 commit merged intomasterfrom unknown repository
Conversation
|
Out of curiosity, what is the motivation for doing this?
What about when
Is this something we actually do? I'm not opposed to this type of change, I'm just curious why we're choosing to do this.. I don't see any additional information in the JIRA ticket. |
|
Additionally, is there plans to try and enforce the use of |
I guess my motivation was selfish.. On my machine: I do not have
I haven't seen any system without
It's definitely something that one could do. I can imagine a future where OSx no longer comes with
This hasn't been planned yet but I imagine it could be done. |
👍 ok, that sounds reasonable.
sure, I was just wondering if this was going to be a requirement moving forward (e.g. some build automation will not work correctly with out it), in which case enforcement would be more necessary.. but sounds like it's more of a best-effort type of thing, where some manual workflows may not work due to how a developer customizes their own development environment, but the product (and automation) should continue to work regardless. |
Backports the following changes: - Add comment to explain use of "--allow-downgrades" (delphix#150) - change drgn upstream repo to main (delphix#161) - TOOL-11734 linux-pkg should use install_build_deps_from_control_file whenever possible (delphix#177) - TOOL-11757 linux-pkg: use build dependencies list stored in virtualization package repository (delphix#175) - TOOL-11815 linux-pkg: kernel sync-with-upstream logic sometimes fails to find expected tags upstream (delphix#178) - TOOL-11892 Bulk modify of shebang lines to use /usr/bin/env (delphix#179)
Problem
We hardcode the shebang of our bash scripts to use
/bin/bash. Thereare two problems with this.
non-portable in the cases where
/bin/bashdoes not exist.what version of
bashthey use by modifying theirPATH.Solution
Use whichever version of
bashis first on their PATH by using/usr/bin/env bashinstead of/bin/bash.Implementation
I greped for
#!/bin/bashand replaced that with#!/usr/bin/env bash. We never passed extra flags such as-eto the shebang so nofuther changes are needed.
Testing
None