GNOME Bugzilla – Bug 726604
#!/bin/bash in src/box_drawing_generate.sh
Last modified: 2014-03-27 18:15:16 UTC
Some systems do not have bash installed in /bin. Change it to #!/usr/bin/env bash is more portable.
Created attachment 272264 [details] [review] Use /usr/bin/env I guess we should change all the scripts then. Is this patch okay? Shouldn't we need a configure check to make sure we have a recent enough bash? Or can we just relax here and silently assume everyone has, and wait until someone actually complains?
-#!/bin/bash -i +#!/usr/bin/env bash That loses the -i.
Instead of using /usr/bin/env, we can check the path of bash in the configure script. I didn't find the -i problem when I reported this bug because src/box_drawing_generate.sh already caused build failure.
Why don't you just create a /bin/bash symlink?
I think we should not require users to modify the system in order to build and install a package.
I meant that freebsd should do that out of the box, not that each user should do it himself. As it stands, this is just a gratuitous difference.
I think a package (bash) should not add things to the system (/bin).
(In reply to comment #2) > -#!/bin/bash -i > +#!/usr/bin/env bash > > That loses the -i. But I added it later on in that script. The reason is that shebang only splits at the first space, the rest is one single argument, as if you typed /usr/bin/env "bash -i" in the shell. (What's the point of that -i, by the way?) (In reply to comment #3) > Instead of using /usr/bin/env, we can check the path of bash in the configure > script. I didn't find the -i problem when I reported this bug because > src/box_drawing_generate.sh already caused build failure. Gosh, I so much wish I created box_drawing.h manually at the first place. Now it's generated by a script which in turn should be generated from a .in script - please noooooooooooo! :) Original proposal of using "/usr/bin/env bash" sounds good to me.
(In reply to comment #1) > Created an attachment (id=272264) [details] [review] > Use /usr/bin/env > This patch works.
Ting-Wei, just to be absolutely sure, could you please confirm that your proposed change works correctly? I mean: please fix the script, run "make" followed by "./src/vte2_90", and insde that terminal run "cat doc/boxes.txt". Do the line drawing characters show up correctly? I'm almost sure they do, but if there's some unexpected problem with freebsd, let's catch it now.
Yes, "cat doc/boxes.txt" shows correctly in "./src/vte2_90".
Comment on attachment 272264 [details] [review] Use /usr/bin/env Did you run 'make check' too? If it passes, ok to commit.
Yes, it passes all 4 tests.
Thanks Ting-Wei! Fixed in vte-0-36.
Fixed on master.