I've developed several utility scripts that solve specific problems of my team's day-to-day work.
Until now what I have done to deploy the script in my co-workers' laptops is as follows:
- Every solution has a
main.sh
script (as well as other scripts and supporting files) - Create a folder in the user's home folder and put the files there
- Add an alias either to
.bashrc
or.bash_aliases
, depending of the Linux distribution, pointing to themain.sh
script - Copy autocompletion file to
/etc/bash_completion.d/
(completion file name is the same as the alias plus.auto
extension). - Copy man page to
/usr/share/man/man1/
then gzipping it (man file name is the same as the alias plus.1
extension).
I would like to create an installer but the alias part is tricky.
- Is there a better option that would also allow for automation (installer)?
- Maybe putting a soft link to the
main.sh
file in/usr/local/bin
instead of creating aliases? - Is there a best-practice for this?