BlinkenArea - GitList
Repositories
Blog
Wiki
permissioner
Code
Commits
Branches
Tags
Search
Tree:
bdbf09a
Branches
Tags
master
permissioner
permissionerc
src
permissionerc.cpp
fix long shutdown delay after Ctrl-C
Stefan Schuermans
commited
bdbf09a
at 2020-09-19 13:55:21
permissionerc.cpp
Blame
History
Raw
/** * Permissioner: set file ownerships and permissions * Copyright 2020: Stefan Schuermans, Aachen, Germany <stefan@schuermans.info> * Copyleft: GNU GENERAL PUBLIC LICENSE version 3 (see LICENSE) */ #include <permissioner/Callback.h> #include <permissioner/Config.h> #include <cstdlib> #include <iostream> #include <stdexcept> #include <string> int main(int argc, char const **argv) { if (argc != 2) { std::cerr << "usage: " << argv[0] << " <config file>" << std::endl; return EXIT_FAILURE; } std::string configFileName(argv[1]); try { Config config; config.parseFile(configFileName); Callback callback; config.setPermissions(callback); } catch (std::exception const &e) { std::cerr << "error: " << e.what() << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; }