Conversation
which may not be installed on all systems.
|
I haven't reviewed, but I'm definitely +1 for this sort of change. |
|
If the goal is portability we should also rewrite the Makefile in something non-posix. Perhaps ShellJs (created by a Mozillian I believe): https://github.com/arturadib/shelljs |
|
Bash and gnu are very portable, where dont they run? |
|
bash is not installed by default on FreeBSD. In addition it should never be installed in /bin on FreeBSD. I believe the same is true for { net, open, dragonfly } bsd. Many operating systems prefer to not use GNU software and specifically avoid GNU extensions. Maybe people prefer using zsh instead of bash, and may even deinstall bash. bashisms are not portable. gnuisms are not portable. POSIX is generally portable (except if you care about windows). please don't give into the embrace, extend, and extinguish model. ;) |
|
umm, prefer is one thing. I am talking about portability not politics. Show me where gnu bash does not run or cannot be made to run. |
|
@matthewp that is awesome! Being the only Windows dev on browserid, that's pretty important to me. I'll get on it so we use shelljs. |
|
h4ck3rm1k3: this has nothing to do with "can be made to run" - this about using standards compliant shell scripting technique. Many operating systems do not install bash by default and users should not be required to do in order to run a simple shell script. Show me one platform Internet Explorer can not be made to run with wine. Should we use IE specific code because "IE can be made to run" ? Remember we are talking about portability, not politics: use standards compliant code, not bash extensions. (p.s. the use of ";)" indicates a joke) |
|
Ok @grimreaper sounds fair to me. |
|
Oh, now i see the commits, yeah that looks fine to me! I did not see that this was a pull but just jumped into the discussion about bash. |
|
If it ain't broke... ShellJS looks cool, and probably makes sense for some of our internal, administrative scripts, but I'm not sure if we'll be able to use it everywhere. I'd be in favor of merging these changes (pending review) and resolving this bug independent of a move to ShellJS. |
|
@callahad Maybe not in every single script (though, eventually, why not?), but some of the scripts are indeed broken on Windows (test_backend, for example). |
|
@lloyd will review and merge this once we double-check that this totally works on our end. Thanks for the pull request, @grimreaper ! |
|
code looks great, if anyone wants to verify the scripts execute fine on linux and macos we can hit the green button, otherwise I'll try to make time to manually test shortly. |
|
tested, manually merging. r+ |
This should be a portable project and should run without relying on bash.
/bin/bash is always wrong
/usr/bin/env bash is sometimes correct
/bin/sh is always correct