How to organize scripts effectively so that they can be used under version control?

I have a growing list of scripts from simple single-line in bash to more complex python scripts. I am currently the source of one liners from the ~/.bash_functions , while I put more complex scripts in /usr/local/bin .

I would like to put all my scripts under version control so that they are easily portable to different machines. Since not only my user scripts are in usr/local/bin , but also other applications, I can just create a subdirectory, for example. eg:

 /usr/local/bin/scripts/ |-python |-ruby |-bash 

and then just create a git repository from the specified scripts folder? Or is there a better, canonical way of actually organizing and checking versions?

+4
source share
1 answer

I set them to ~/bin and add this to your $PATH . You can then manage your bin directory as you wish.

+1
source

All Articles