Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add path option to config file to specify additional search paths #117

Open
danudey opened this issue Dec 14, 2015 · 6 comments
Open

Add path option to config file to specify additional search paths #117

danudey opened this issue Dec 14, 2015 · 6 comments

Comments

@danudey
Copy link

danudey commented Dec 14, 2015

It would be nice if the config file had a path option to add another location to the search path. Ideally a list of paths to search, but a single path suffices for my purposes. I've already patched our own local version with an ugly hack, but I figure other users could probably benefit from a properly-written patch. This seems like a more user-friendly option than modifying the PATH environment variable, too.

@toy
Copy link
Owner

toy commented Dec 28, 2015

Could you please describe a bit in which situation do you need it?
Besides modifying PATH you can also use XXX_BIN environment variables, but I assume it will not be more helpful.

@danudey
Copy link
Author

danudey commented Dec 28, 2015

Because we are running an older Ubuntu version, I compiled a new libpng and new versions of every tool, to make sure we have the latest performance and fixes. Because I don't want to affect other software, it's all installed in /opt/image_optim/bin (so /opt/image_optim/bin/pngquant, /opt/image_optim/bin/pngcrush, etc.).

I see that image_optim looks in a lot of places (/usr/bin, /usr/local/bin, etc), but I feel like if someone needs to look in a separate location, like /opt/bin or ~/bin or something, they're going to have more than one binary there.

For us we can always change all of the XXX_BIN but that's a lot of environment variables. We can also change PATH but that can be problematic because we are calling image_optim from a few scripts and I don't want to change all of them to export PATH, but I also don't want to add it to the global PATH either.

I hope this makes sense. I did try to make the change myself, but ruby projects are very complicated for people who have never used ruby before.

@toy
Copy link
Owner

toy commented Dec 28, 2015

Yes, sure, I've assumed something like this. Just to check: would image_optim_pack be an option for you?

@danudey
Copy link
Author

danudey commented Dec 28, 2015

According to my developer:

That said image_optim_pack's pngquant is outdated, we want 2.x

Generally if I'm installing software I like to compile it myself, but if image_optim_pack can be updated then it would be an option for us in the future. Still, I prefer to do it myself when possible.

@toy
Copy link
Owner

toy commented Dec 28, 2015

But it is 2.5.2 — https://github.com/toy/image_optim_pack/blob/v0.2.1.20151113/Makefile#L16 (Which is the latest https://raw.githubusercontent.com/pornel/pngquant/master/CHANGELOG)
Also I understand the point of compiling yourself, so then yes it would be helpful to have an option to specify which bin paths to search through.

@danudey
Copy link
Author

danudey commented Dec 28, 2015

Well I don't know what to tell you then, I guess the developer was wrong.

I still think it would be a useful feature, but I guess I could have saved a few hours of compiling too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants