I’ve written a rather extensive BASH script to perform a bunch of tasks. Within this master script other scripts are called. What is the best way to package this script so that another user can use the base script.
I’ve thought of a few methods:
Send all of the dependencies along with the master script:
This may run into problems with the other user not understanding how to place scripts into their PATH but would be easy enough send.
Add the contents of all the scripts as functions to the master:
This would require quite a bit of rewriting so that all of the scripts can be accessed. Then if I ever make changes in the future it is much harder for me to keep the Master current with the sub-scripts.
Can anyone think of another way of packaging a set of scripts (and executable) so that it is easy for an end user that receives it to run the package with a minimum number of hassles?
You could modify
PATHat the beginning of the master script, since it doesn’t sound like the users would need to run the dependencies manually (that is, outside of the master script).