From a9b6c2bd68ccfd72a833355fce55feda914fe3bd Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Wed, 13 Sep 2023 23:59:09 +0200 Subject: Add MMV_NAME and MCP_NAME compile-time variables Due to the sheer popularity of the "mmv" name it might conflict with other programs installed on the user's computer. As such the MMV_NAME and MCP_NAME environmental variables can control the program's name at compile time, allowing the user to avoid name conflicts with other programs. If the variables are not set then they will silently default back to "mmv" and "mcp" respectively. Signed-off-by: Luca Matei Pintilie Co-authored-by: Thomas Voss --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index ce25f4f..2066f2f 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,24 @@ $ make $ sudo make install ``` +The following environment variables can also be set at compile-time to modify +the names of the generated binaries: + +- `$MMV_NAME` + + The name of the file-moving binary (default is `mmv`). This is also used + to name the backups folder in `$XDG_CACHE_HOME`. +- `$MCP_NAME` + + The name of the file-copying binary (default is `mcp`). + +If you are compiling with a custom binary name, you want to make sure that the +environment variables actually get used when performing a `make install`. If +you’re using `sudo`, you want to do this with the `-E` flag. + +``` +$ MMV_NAME=mmv-rs MCP_NAME=mcp-rs make +$ MMV_NAME=mmv-rs MCP_NAME=mcp-rs sudo -E make install +``` + ## Examples and Documentation To avoid repeating myself everywhere, if you would like to see usage examples -- cgit v1.2.3