Added -c or -config command line parameter

You can now specify the ipfs repository directory from the command line
by using -c [dir] or --config [dir]
This commit is contained in:
John Jones 2017-04-06 17:46:40 -05:00
parent bc19434490
commit 794608a7ea
6 changed files with 150 additions and 50 deletions

View file

@ -15,3 +15,14 @@ int make_ipfs_repository(const char* path);
* @returns true(1) on success
*/
int ipfs_repo_init(int argc, char** argv);
/**
* Get the correct repo directory. Looks in all the appropriate places
* for the ipfs directory.
* @param argc number of command line arguments
* @param argv command line arguments
* @param repo_dir the results. This will point to the [IPFS_PATH]/.ipfs directory
* @returns true(1) if the directory is there, false(0) if it is not.
*/
int ipfs_repo_get_directory(int argc, char** argv, char** repo_dir);