2 * Copyright © 2020 Red Hat, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
30 #include "tools-common.h"
35 printf("Usage: xkbcli [--help|-h] [--version|-V] <command> [<args>]\n"
38 " -h, --help ...... show this help and exit\n"
39 " -V, --version ... show version information and exit\n"
44 main(int argc, char **argv)
55 static struct option opts[] = {
56 { "help", no_argument, 0, OPT_HELP },
57 { "version", no_argument, 0, OPT_VERSION },
61 c = getopt_long(argc, argv, "+hV", opts, &option_index);
63 c = getopt(argc, argv, "+hV");
75 printf("%s\n", LIBXKBCOMMON_VERSION);
79 return EXIT_INVALID_USAGE;
85 return EXIT_INVALID_USAGE;
91 return tools_exec_command("xkbcli", argc, argv);