MDecker-MobileComputing / mr4b

My (Git) repositories for Bash (mass operations on Git repositories).
GNU General Public License v3.0
0 stars 0 forks source link
bash git

My Git-Repositories for Bash (mr4b)


mr4b is a command line utility to perform mass operations on Git repositories on the local machine. It is just a collection of Bash scripts and therefore should run on most Linux(-like) environments.






About mr4b


In contrast to many competiting solutions for performing mass operations on Git repositories, mr4b does not required a special scripting language like Python or Perl and therefore should also run on most restricted or "emulated" Linux environments with the Bash shell and Git. For example, it runs in Cygwin or MinGW on Windows and also on MacOS.


mr4b was inspired by myrepos.



Installation


The PATH variable mentioned in this sections means the environment variable PATH of your Linux environment.



Basic usage


After installation you can enter mb4r help to obtain usage hints, which outputs the content of this help file.


Go to a folder which is the root folder (working directory) of a Git repository and register it:

cd ~/Project_A/GitRepo123
mr4b register

After this you can register a further folder:

cd ~/Project_B/active/GitRepoABC
mr4b register


It is also possible to register all Git repository folders that are below the current folder. Let's assume you have the following folder structure:

/abc/GitRepo-1
/abc/def/ProjectA/GitRepo-2
/abc/def/ProjectA/GitRepo-3
/xyz/GitRepo-4

Now go into folder /abc and call registerResursively:

cd /abc
mr4b registerResursively

The result will be that GitRepo-1, GitRep-2 and GitRepo-3 are registered, but not GitRepo-4.


If at least one repository folder is registered, then you can execute one of the supported Git commands on all the registered Git repository folders with just one command. For example, to get the Git status information on all registered repositories:

mr4b status

You can also perform git pull for all registered repos with one command:

mr4b pull

Since the latter one requires network interaction, mr4b will wait a few seconds between the individual calls of git pull.



Build deb or rpm package


In the wiki belonging to this repository you can find pages describing how to build a deb package and how to build a rpm package with mr4b.



License


See the LICENSE file for license rights and limitations (GPL v3).