Commit Graph
100 Commits
Author SHA1 Message Date
Riyyi bc01b34e58 Util: Calculate JSON line number before lexing 2022-06-25 14:05:45 +02:00
Riyyi 68bc95fdf1 Util: Implement new JSON Job class 2022-06-24 14:56:37 +02:00
Riyyi 13d020a351 Util: Add JSON Job class
This class holds the to parse string and has a helper for printing error
messages.
2022-06-24 14:46:21 +02:00
Riyyi af678374bc Util: Add emplace() to Json::Value 2022-06-23 14:54:29 +02:00
Riyyi e5978310bf Util: Fix Parser Json::Value construction 2022-06-23 14:19:06 +02:00
Riyyi 8bfae9b483 Util: Add more ways of accessing and creating Json::Value objects 2022-06-23 13:47:07 +02:00
Riyyi 9f7fe81ef6 Util: Add parse() and dump() to Json::Value 2022-06-23 13:45:07 +02:00
Riyyi aad95de5fd Util: Add a JSON stringifier 2022-06-22 14:23:29 +02:00
Riyyi c385432bb0 Util: Add JSON accessors 2022-06-16 11:38:22 +02:00
Riyyi 5188d57d19 Util: Add JSON parser 2022-06-07 12:46:13 +02:00
Riyyi 0880d98fe0 Util: Add JSON Array/Object/Value types 2022-06-07 12:46:13 +02:00
Riyyi 1c676f9548 Util: Add JSON lexical analyzer 2022-06-07 12:46:13 +02:00
Riyyi cfe2987e50 Manager: Do not bail one of the targets requires root privileges 2022-03-23 23:17:50 +01:00
Riyyi 0e966a6408 Manager: Fix error message when copying files unprivileged 2022-03-23 23:16:25 +01:00
Riyyi 50baae0a66 Manager: Do not bail if one of the targets doesn't exist 2022-03-23 23:07:04 +01:00
Riyyi 4cac25b5b3 Manager: Change match() path argument type
Changed the path argument from directory_iterator to string, as nothing
in this function relied on the functionality.
2022-03-08 00:18:04 +01:00
Riyyi f4fe44ad02 Manager: Run clang-format 2022-03-08 00:07:54 +01:00
Riyyi db22cc9f06 Manager: Add new pattern logic to system config files 2022-03-08 00:06:01 +01:00
Riyyi 3b4ea3f42d Manager: Rename filter() -> match()
The function returns true on a pattern match, so reflect this in the
name.
2022-03-08 00:06:01 +01:00
Riyyi 37be9506c8 Manager: Rename pattern and iterator variables
ignorePattern -> pattern
ignoreIterator -> patternIterator
2022-03-08 00:06:01 +01:00
Riyyi ed13b1f6b5 Manager: Add new pattern logic to pulling/pushing targets 2022-03-08 00:05:54 +01:00
Riyyi 4110680cc6 Test: Run clang-format 2022-03-06 17:22:21 +01:00
Riyyi 6f1f1c3fe7 Everywhere: Rename "excludePath" to "ignorePattern" 2022-03-06 17:21:16 +01:00
Riyyi b37a8087e9 Everywhere: Change exclude path configuration formatting 2022-03-06 17:10:08 +01:00
Riyyi 4ff3092b2f Manager: Move the dotfile filter function 2022-03-06 16:38:42 +01:00
Riyyi 832816a87e Test: Add exclude path test cases for the new /.gitignore*/ logic 2022-03-06 16:35:57 +01:00
Riyyi 57d50a6dbb Test: Add argument to not delete test files in the home directory 2022-03-06 16:33:18 +01:00
Riyyi 7f1558bc64 Manager: Change exclude path logic to /.gitignore*/ style 2022-03-06 14:48:38 +01:00
Riyyi e00ff4ba6a Test: Change expect macros to support optional parameters 2022-03-05 17:19:25 +01:00
Riyyi 6a25f58be2 Meta: Update exclude paths list in the example 2022-03-03 00:38:09 +01:00
Riyyi 7cfe06e86e Doc: Add config file to exclude paths list 2022-03-03 00:36:27 +01:00
Riyyi fa1e0abc00 Test: Add test cases for symbolic link add/pull/push actions 2022-03-02 15:43:35 +01:00
Riyyi 3ed700863a Manager: Fix symbolic link pulling and pushing 2022-03-02 15:43:20 +01:00
Riyyi cf27699c00 Test: Also delete symbolic links that point to non-existent files 2022-03-01 22:38:46 +01:00
Riyyi 06042588ee Manager: Create directories for holding symlinks when pushing/pulling 2022-03-01 16:57:39 +01:00
Riyyi 59fe52202b Test: Update selectively commenting test to include C-style comments 2022-02-11 21:48:21 +01:00
Riyyi 8ccdd907fc Manager: Add support for C-style comments when pushing dotfiles 2022-02-11 21:41:17 +01:00
Riyyi 272c728e13 Manager: Use early-exit return style to decrease nesting 2022-02-10 14:15:57 +01:00
Riyyi b10711686f Manager: Remove unused variable 2022-02-10 14:11:59 +01:00
Riyyi dbf444ae48 Meta: Add exclude paths and system directories to README.org 2022-02-10 13:43:15 +01:00
Riyyi 5960549015 Meta: Update build requirements formatting in README.org 2022-02-10 00:02:33 +01:00
Riyyi 644255200e Meta+CMake: Convert JSON library from git submodule to system package 2022-02-09 23:57:38 +01:00
Riyyi 91df37328e Manager: Update headers 2022-02-09 23:00:05 +01:00
Riyyi d1b2608e8f CMake+Doc: Add configuration file example 2022-02-09 22:56:04 +01:00
Riyyi 16947b93e2 Manager+Test: Move exclude paths and system directories to config 2022-02-08 23:39:12 +01:00
Riyyi da91c4b3fd Manager: Add config file parsing 2022-02-08 22:54:57 +01:00
Riyyi b7fce68144 Meta: Add JSON parsing library dependency 2022-02-08 22:52:21 +01:00
Riyyi c853dfcf24 Manager: Search config file recursively from the working directory 2022-02-07 21:37:15 +01:00
Riyyi 12c11cff9e Manager: Move working directory to the config class 2022-02-07 21:26:50 +01:00
Riyyi e5cce5f3a9 Manager: Convert package class to singleton 2022-02-07 16:57:15 +01:00
Riyyi 63d011d00a Meta: Add build requirements to README.org 2022-02-07 13:20:47 +01:00
Riyyi 9b87ad7f1d CMake: version 3.16 doesn't support the rm command 2022-02-07 12:57:11 +01:00
Riyyi ef1fce060a Manager: Drop 'sudo' package dependency 2022-02-02 22:24:12 +01:00
Riyyi 439f39218b Manager: Drop 'cat' package dependency 2022-02-02 22:10:37 +01:00
Riyyi 7672180eb7 Manager: Handle package list errors 2022-02-02 21:49:05 +01:00
Riyyi 3a10ca3d59 Manager: Drop 'which' package dependency 2022-02-02 21:25:25 +01:00
Riyyi 18da83e7bb Manager: Implement AUR helper detection 2022-02-02 21:17:09 +01:00
Riyyi 4bf7b3d38f Manager: Put machine information fetching in separate functions 2022-02-02 18:10:35 +01:00
Riyyi 5f023e579a Manager: Enable flag for -git AUR package installation 2022-02-02 14:07:45 +01:00
Riyyi 50c98b1482 Manager: Implement package installation 2022-02-02 12:29:10 +01:00
Riyyi 42b34aad61 Manager: Create package list file if non-existent 2022-02-01 18:16:56 +01:00
Riyyi 592ee124cb Manager: Do not print debugging output on release mode 2022-01-31 20:42:17 +01:00
Riyyi 8cb2affc50 Manager: Clean up main.cpp 2022-01-31 20:26:44 +01:00
Riyyi 9656760ef8 Test: Move unit tests into separate directory 2022-01-31 15:56:28 +01:00
Riyyi 5147721fb5 Meta: Fix typo in README.org 2022-01-31 15:14:45 +01:00
Riyyi 25905594a2 Meta: Add build instructions and basic usage to README.org 2022-01-31 11:17:45 +01:00
Riyyi d4ef69451e CMake: Rename project stowage => manafiles 2022-01-31 11:14:31 +01:00
Riyyi aad44f95ff CMake: Add uninstall target 2022-01-30 21:02:54 +01:00
Riyyi bbed6acee9 CMake+Doc: Add man page and its installation 2022-01-30 21:02:54 +01:00
Riyyi 3c1f55768f CMake: Add installation of the program binary 2022-01-29 21:59:51 +01:00
Riyyi 688ae78fd3 CMake: Put the run target in the targets section 2022-01-29 21:58:52 +01:00
Riyyi d8a752ac83 CMake: Improve build type detection 2022-01-29 17:37:44 +01:00
Riyyi 49448de932 CMake: Reorganize root file 2022-01-29 17:37:44 +01:00
Riyyi 401a70fbd7 CMake: Version 2.4 and below should fail instead of giving a warning 2022-01-28 21:21:43 +01:00
Riyyi 9ace822a46 CMake: Define language in project targets, dedup CXX settings 2022-01-28 11:32:13 +01:00
Riyyi c4019cde11 Test: Add test case for selectively commenting 2022-01-25 14:18:32 +01:00
Riyyi 91f8253ed5 Test: Update verify macro to support a custom result behavior 2022-01-25 13:58:44 +01:00
Riyyi b9aff29293 Test: Convert homeDirectory std::string => std::filesystem::path 2022-01-24 19:52:23 +01:00
Riyyi 1a9b0d870a Test: Properly test adding non-existing dotfiles 2022-01-24 19:46:41 +01:00
Riyyi c61aefa2e3 Test: Add dotfile test case for path exclusion 2022-01-24 19:39:51 +01:00
Riyyi 4fd90cfa43 Test: Only compute process ID once 2022-01-24 17:47:50 +01:00
Riyyi e2f9ed1176 Test: Fix file permissions for system file tests 2022-01-24 17:27:40 +01:00
Riyyi 422f71f19e Test: Add system file test cases 2022-01-24 15:02:15 +01:00
Riyyi ff92522b8c Test: Add stderr stream pointer to the test suite 2022-01-24 14:58:48 +01:00
Riyyi b961e17b50 Test: Set ownership of created dotfile test files to the current user 2022-01-24 14:45:40 +01:00
Riyyi eb4822b44b Test: Add macro that bails function if the condition fails 2022-01-24 14:44:04 +01:00
Riyyi 82f38345d1 Manager: Fix system target detection in working directory 2022-01-24 14:24:17 +01:00
Riyyi 1b4de8fb5d Manager: Run clang-format 2022-01-24 01:09:22 +01:00
Riyyi 4da262a8fe Manager: Add working directory getter 2022-01-24 01:03:30 +01:00
Riyyi c032373940 Manager: Add verbose flag and store it in new Config class
Check the verbosity in the Dotfile class when printing file operations.
2022-01-24 01:03:30 +01:00
Riyyi 5ec1272172 Manager: Set process group ID before user ID
setegid() needs to be called before seteuid(); otherwise, the setegid()
call will fail because the process no longer has root privileges.
2022-01-24 01:03:30 +01:00
Riyyi 7856e9017c Test: Add dotfile test cases 2022-01-24 01:03:30 +01:00
Riyyi 8c8eb01d18 CMake: Compile all sources for the test suite binary 2022-01-24 01:03:30 +01:00
Riyyi 5d5c37a496 Manager: Detect system files correctly during add and pull operations 2022-01-24 00:29:50 +01:00
Riyyi d7ff637fd0 Manager: Convert dotfile class to singleton 2022-01-24 00:29:50 +01:00
Riyyi 54dc515def Util: Make file append const reference 2022-01-24 00:29:50 +01:00
Riyyi 817b898b28 Test: Fix memory leak when adding a test case 2022-01-24 00:29:50 +01:00
Riyyi a8e73063ee Util: Add file create function 2022-01-24 00:29:50 +01:00
Riyyi abbf764a3e Manager: Add feature to selectively comment and uncomment 2022-01-24 00:29:50 +01:00
Riyyi 7f8ca38462 Manager: Use constructor over auto 2022-01-24 00:29:50 +01:00