AutoBlih is a bash
script to automatically create and clone blih
Git repositories.
To use AutoBlih as a regular command line tool, you can use the following syntax:
autoblih my.user@epitech.eu repo_name target_dir otheruser@epitech.eu:rw,user:r
The example above will create a repository called repo_name
on my.user@epitech.eu
's account,
set ACL to otheruser@epitech.eu
as read-write and to user
as read-only, and clone the resulting
repository in target_dir/repo_name
.
AutoBlih really shines when used in batch mode. Simply place a file called Blihfile
in the current
directory with these contents for example:
my_repo_1 my_directory lol@epitech.eu:r
my_repo_2 . user:rw,lol:r
...then run autoblih my.user@epitech.eu
without further arguments.
The syntax is the same as in CLI mode, which means the example above will do
the following on my.user@epitech.eu
's account:
- Create
my_repo_1
with read access tolol@epitech.eu
then clone it inmy_directory/my_repo_1
- Create
my_repo_2
with read-write access touser
and read access tolol
then clone it inmy_repo_2
There is no limit to the number of lines, or the number of ACL for each line.
AutoBlih's behavior can be configured using environment variables. The following variables are read:
BLIHFLAGS
- Arguments to be added to calls toblih
, such as your token.GITFLAGS
- Arguments to be added togit clone
.
git
to clone the repository once created- A working SSH key on Blih
blih
to do pretty much everything else
If you don't know what Blih or ACL are, then you most likely don't need this.