new: implement --version option
This commit is contained in:
12
src/main.c
12
src/main.c
@ -108,14 +108,20 @@ END:
|
||||
}
|
||||
|
||||
int main(int argc, char **argv, char **envp) {
|
||||
signal(SIGINT, SIG_IGN);
|
||||
setlocale(LC_ALL, "");
|
||||
textdomain("xcfg");
|
||||
|
||||
if (getuid() == 0) {
|
||||
error(_("You should use this script as a regular user, not as root!"));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
signal(SIGINT, SIG_IGN);
|
||||
setlocale(LC_ALL, "");
|
||||
textdomain("xcfg");
|
||||
if (argc >= 2 && strcmp(argv[1], "--version") == 0) {
|
||||
success(_("Simple xorg configuration tool %s"), VERSION);
|
||||
info(_("Licensed under GPLv3, see https://www.gnu.org/licenses/ for more information"));
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
struct Desktop desktops[] = {
|
||||
{
|
||||
|
Reference in New Issue
Block a user