Parchive / par2cmdline

Official repo for par2cmdline and libpar2
http://parchive.sourceforge.net
GNU General Public License v2.0
723 stars 75 forks source link

Minor cleanup #162

Closed a1346054 closed 2 years ago

mdnahas commented 3 years ago

Thanks, a1346054!

I looked over the code changes. They seem okay with me. I haven't done a compile & run tests, yet.

I think the other developers may want to discuss the change from "#!/usr/bin/bash" to "#!/usr/bin/env bash". As I understand it, this means that the "bash" command will be found using the user's PATH, rather than looking in a fixed directory ("/usr/bin/"). The good side of this change is that the script will run even if bash is not in "/usr/bin/". And, if the user has installed multiple copies of bash, it will run the version the user's preferred version. The bad side of this change is that it adds a dependency on the user's PATH.

This change is only made to the scripts in the "build/" directory. Those seem to be invoked by hand, rather than as part of the automated testing, so it is probably fine.

We should, at some point, look at the scripts in the "build/" directory. They have extension ".sh". The ones that do not use bash-specific features should be changed to invoke "sh" instead of "bash". Those that do use bash-specific features should be renamed with the extension ".bash". (And, really, we should find a way to not use "#!" to decide which program is running a script.) But these are all discussions for another day. I think the change to use "/usr/bin/env" is fine for this commit.

I'm willing to accept this change. (Assuming it compiles and passed tests on my system (Linux & MingW32)). Any objection?

a1346054 commented 3 years ago

I added a few more spelling fixes.