0

I am working on a tool that primarily uses bash scripts and C++ code.

Generally I have experience with basic tools written in C and C++ in which we can have a build system like ./configure; make; make install in which we can simply install the libs and bins to the locations provided to third parties like /usr/local/lib or /usr/local/bin.

What I don't know is what to do with scripts. Like what are the commonly used practices to deploy software with many bash scripts? Where do I store them on target machine?

2

Like what are the best practices to deploy software with many bash scripts?

Given you refer to /usr/local/lib and /usr/local/bin, I'm assuming you're on some kind of Unix-ish machine - there, the answer is simple: use the OS's package manager. Build a .deb/.rpm or whatever and use the infrastructure which already exists.

| improve this answer | |
  • Yea what you say is completely sensible. But that would require doing it for all pkg managers(yum, apt, macports, etc etc) that are being used on that respective OS. As my software is portable over almost all *nix, a simpler solution right now would be to have a simple build from source. My point was that like /usr/local/* directory structure would work on almost all *nix OS I know, is their something like that for my scenario? – Mihir Jun 12 at 9:19
  • At this point, you probably need to read this meta question. – Philip Kendall Jun 12 at 9:23
  • Well in that case maybe I misunderstood the rules of this site. I had read the tour of this site and it said "ask about, software development methods and practices" maybe that's not for best practices. Ok thanks for letting me know. – Mihir Jun 12 at 9:26
  • 1
    The trouble is not "practices" but "best". It's fine to ask about practices, but when you start asking what's "best" it rapidly becomes a personal thing - what I regard as best may not be what you regard as best, because you have different constraints from me. – Philip Kendall Jun 12 at 9:32
  • Thanks. Have edited my question a bit. Maybe it no longer opinion based. – Mihir Jun 12 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.