The commandline client is a commandline tool for using the reference clients.

It currently supports the operations GetFile, GetFileIDs, GetChecksums, PutFile, DeleteFile and ReplaceFile.

Installation

Requires java 8 and perl is install to run on Linux and Mac.

Requires java8 to run on Windows. 

Download the chosen version of the bitrepository-command-line-XXX-distributed.tar.gz from here (XXX refers to the version):

https://sbforge.org/nexus/content/repositories/releases/org/bitrepository/reference/bitrepository-client/. The latest devel client can be found here

Unpack the file in any wanted location, eg. 

tar -xvf bitrepository-command-line-XXX-distributed.tar.gz

It requires a 'conf' sub-directory to the installation which contain all the settings, etc. for the setup of the collection. This can be done in either of the two ways:

Certificate

If secure communication is used for this bit repository, a client certificate needs to be define. In this case the client expects to find a certificate name client-certificate.pem in the conf folder. Either name the certificate client-certificate.pem  directly or create a symlink to the certificate.

Execute

The different commands can be run with the bitmag.sh script (bitmag.cmd on windows). Eg. 

./bitmag.sh get-checksums -c test1

Will fetch the checksums for the test1 collection.

get-file

Retrieves a file. It takes the following arguments:

get-file-ids

Get the list of files in a collection 'get-file-ids.sh' command. It takes the following arguments:

get-checksums

Lists the checksum for the files in the indicated collection. It takes the following arguments:

put-file

Puts a file into a collection. It takes the following arguments:

delete

Deletes a file in the bitrepository. It takes the following arguments:

replace-file

Replaces a file in the bitrepository with the provided file. It takes the following arguments: