diff options
author | Thomas White <taw@physics.org> | 2020-07-29 15:44:02 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:45 +0200 |
commit | 42898f7d59e215434fa2aead84223f64b30fcee8 (patch) | |
tree | 5cdfb4c0c279c766efcbbc6c455ee58a5c8741f1 /src/cell_tool.c | |
parent | 6105a7797b96418d940ced7d88c6cf2b308b9711 (diff) |
New way of injecting version information
Also, this fixes some incorrect headers and adds --version flags to
programs which didn't yet have them.
Diffstat (limited to 'src/cell_tool.c')
-rw-r--r-- | src/cell_tool.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/cell_tool.c b/src/cell_tool.c index 8170b27b..bcfb326f 100644 --- a/src/cell_tool.c +++ b/src/cell_tool.c @@ -39,10 +39,12 @@ #include <getopt.h> #include <assert.h> -#include "cell.h" -#include "cell-utils.h" -#include "reflist-utils.h" -#include "reflist.h" +#include <cell.h> +#include <cell-utils.h> +#include <reflist-utils.h> +#include <reflist.h> + +#include "version.h" static void show_help(const char *s) @@ -54,6 +56,7 @@ static void show_help(const char *s) " -h, --help Display this help message.\n" " -p, --pdb=<file> Get unit cell from <file> (PDB or CrystFEL format).\n" " -o <file> Output unit cell file.\n" +" --version Print CrystFEL version number and exit.\n" "\n" " Actions:\n" " --find-ambi Find indexing ambiguities for the cell.\n" @@ -487,6 +490,7 @@ int main(int argc, char *argv[]) {"pdb", 1, NULL, 'p'}, {"tolerance", 1, NULL, 2}, {"output", 1, NULL, 'o'}, + {"version", 0, NULL, 6}, /* Modes of operation */ {"find-ambi", 0, &mode, CT_FINDAMBI}, @@ -546,6 +550,13 @@ int main(int argc, char *argv[]) rmax = 1.0 / (highres/1e10); break; + case 6 : + printf("CrystFEL: %s\n", + crystfel_version_string()); + printf("%s\n", + crystfel_licence_string()); + return 0; + case 0 : break; |