I have been using bin/ to place my various bash scripts. I remember reading that this is incorrect because of bundle install --binstubs
, which would be confusing to be mixed with our own bash scripts (or might even overwrite, causing a conflict).
I vaguely think that the correct answer is script/, but I think that may also not be right.
Obviously the "answer" doesn't matter much, but if there is a standard location, I think it would make sense to use it.
There doesn't seem to be a "correct" answer for this. It's something I've looked for several times in the past, but I have never been satisfied enough to think of something as an agreed-on standard.
In practice, I've seen binaries placed in script/
(do you really think that whole directory should have only one file?), lib/script
(I can see the logic behind this, fitting with other "lib"-like things), lib/<various subdirectories>
(for more-organised use of lib/
) or rewritten to be rake tasks (lib/tasks
)
I looked for it in bundler and I found out this issue: https://github.com/carlhuda/bundler/issues/1250
They sad that binstubs can take values, so you can point the binstubs somewhere else. So the solution is the opposite of what you thought, you will point the binstubs to another path and keep your scripts in /bin.
bundle install --binstubs some_value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With