daveewart / colordiff

Primary development for colordiff
http://www.colordiff.org/
GNU General Public License v2.0
177 stars 37 forks source link

Use /usr/bin/env to find perl executable (fixed) #52

Closed matthiasdiener closed 2 years ago

matthiasdiener commented 3 years ago

Not all systems have perl in /usr/bin/perl .

Followup of #50 and #51.

Tested on GNU env (env (GNU coreutils) 8.32) and BSD env.

daveewart commented 3 years ago

Thanks for the revision.

I'm just wondering what the best approach here is. I see that using /usr/bin/env could make the script more portable to casual users, but for packaging purposes according to Debian Policy Manual https://www.debian.org/doc/debian-policy/ch-files.html#scripts the Perl shebang should be used and Debian or Debian-derived distributions are where most of the established installations of colordiff reside.

vitahall commented 2 years ago

Unfortunately, env -S is fairly new and not universally portable. Among current systems I have access to, OpenBSD 7.0 and OmniOS r151038 (based on OpenSolaris) don't support the -S. I've submitted pull request #53 that instead changes the -w to use warnings and thus removes the need for the -S.

daveewart commented 2 years ago

Won't merge this due to lack of portable and conflict with Debian policy.