dkogan / feedgnuplot

Tool to plot realtime and stored data from the commandline, using gnuplot.
Other
707 stars 37 forks source link

shebang #28

Closed xuboying closed 6 years ago

xuboying commented 7 years ago

using #!/usr/bin/env perl instead of #!/usr/bin/perl ?

dkogan commented 7 years ago

On November 11, 2016 1:28:52 AM PST, Boying Xu notifications@github.com wrote:

using #!/usr/bin/env perl instead of #!/usr/bin/perl ?

No. Sorry.

xuboying commented 7 years ago

No worries, comparing the trouble for me when parsing timezones(wrong epoch value). the shebang is nothing:)

etiennepellegrini commented 3 years ago

Apologies about reviving this issue. I believe a mention of the hard-coded path to perl in the Readme or INSTALL files would be beneficial to anyone who, like me, would like to use feedgnuplot but has a non-standard setup.

Out of curiosity, what are the drawbacks of using #!/usr/bin/env perl that make you so categorical about it?

dkogan commented 3 years ago

Hmmm. My general feeling is that people should be using a reasonable distro, with reasonable package management, to keep things predictable and easy. So the user does

apt install feedgnuplot

which pulls in the perl interpreter that is guaranteed to work, and you're done.

For whatever reason many people decided they want to use OSs that don't have package management (osx, windows, whatever), so they need weird workarounds like /usr/bin/env (no idea if that's your use case, but that's the one I hear about most often). So I could change the script to use #!/usr/bin/env, and then apply a distro patch to convert it back to

!/usr/bin/perl at packaging time. But then I'm making extra

accomodations for people's nonstandard decisions, which doesn't feel like it should be on me.

I'll probably just do it, since this would simplify life for many people. Give me a few days

dkogan commented 3 years ago

I didn't need a few days. I just pushed the change. Can you try it, and let me know if that's what you were looking for? Thanks.

etiennepellegrini commented 3 years ago

I just pushed the change

I feel dumb, can't find your changes!

For whatever reason many people decided they want to use OSs that don't have package management

Can't talk for the other people out there, but for me, it's because my company doesn't give me root access. So I resolved to installing everything locally, using Linuxbrew (so in ~/.linuxbrew/...), instead of having to wait for a sys admin to help every time I want to test something new

But then I'm making extra accomodations for people's nonstandard decisions, which doesn't feel like it should be on me.

I don't think it is or should be on you either! It's more a matter of reach, if you want to be able to also help out people who want or have to have weird distros. Kind of the same idea as putting it up here in the first place (which, by the way, thanks a lot!)

dkogan commented 3 years ago

Hi. I'm just complaining. Feel free to ignore.

I forgot to actually push the patch earlier. I just did that, and the change is in git. Can you please try it out to make sure it works for you?

etiennepellegrini commented 3 years ago

It indeed works for me! Thanks!