Commit Graph
81 Commits
Author SHA1 Message Date
Riyyi bc3fc6c345 Manager: Put machine specific values in a separate class 2022-01-24 00:29:50 +01:00
Riyyi 26826bc077 Manager: Update main for current functionality 2022-01-09 15:49:21 +01:00
Riyyi aa702b79b9 Manager: Move package list grabbing to separate function 2022-01-09 15:47:03 +01:00
Riyyi ac862982da Doc: Update readme 2022-01-09 15:45:36 +01:00
Riyyi d9f95f5332 Manager: Add fixme to user getlogin() 2022-01-09 15:43:13 +01:00
Riyyi 2af81120c3 Manager: Implement convenience functions in Package 2021-10-02 17:28:44 +02:00
Riyyi a04b5232f4 Util: Add delimiter support to the cut function 2021-10-02 12:14:14 +02:00
Riyyi 22082a515b Util: Add convenience functions to save external process creation 2021-09-26 00:14:43 +02:00
Riyyi be552db0fb Manager: Start working on package tracking 2021-09-25 17:16:33 +02:00
Riyyi 418b453507 Util: Add file class 2021-09-25 16:55:37 +02:00
Riyyi ee451671cd Util: Fix reading of file descriptors longer than 4096 bytes 2021-09-25 11:29:49 +02:00
Riyyi 9ff368e511 Manager: Remove Dotfile from namespace 2021-09-24 11:08:50 +02:00
Riyyi 5226e6a24a Manager: Add file pushing function 2021-09-23 20:09:12 +02:00
Riyyi 34e0dc72ec Manager: Don't need to do a full capture 2021-09-23 20:01:46 +02:00
Riyyi e6842f58d8 Manager: Remove non-related parameter from callback 2021-09-23 20:00:18 +02:00
Riyyi c14db5bd46 Manager: Rename files to paths 2021-09-23 19:57:17 +02:00
Riyyi 5f2bbce080 Manager: Add file pulling function 2021-09-23 19:54:32 +02:00
Riyyi f3ed90e499 Manager: Rename targets to paths 2021-09-23 17:36:04 +02:00
Riyyi cb592b8d2c Manager: Make file syncing logic generic 2021-09-23 17:35:13 +02:00
Riyyi 58bf5b98ee Manager: Add function to check if file is system type 2021-09-23 17:24:17 +02:00
Riyyi e7d1515fca Manager: Add index to dotfile iteration loop 2021-09-23 16:01:19 +02:00
Riyyi e4d90bf281 Manager: Make the callable functions non-static 2021-09-23 00:40:02 +02:00
Riyyi 7920b7280e Manager: Add generic dotfile looping 2021-09-23 00:38:48 +02:00
Riyyi de4b96bd47 Manager: Add Dotfile adding function 2021-09-22 00:26:23 +02:00
Riyyi f8ccfe79b8 Manager: Add target filtering to Dotfile::list() 2021-09-20 18:18:31 +02:00
Riyyi 1893f08ea8 Manager: Start working on dotfile class 2021-09-20 01:00:14 +02:00
Riyyi 12dd000f0b Util: Pass string by const reference 2021-09-19 11:46:19 +02:00
Riyyi 6293e2aaf7 Project: Release under MIT license 2021-09-18 12:40:00 +02:00
Riyyi 875a49332c Test: Add Shell and System test cases 2021-09-18 10:33:22 +02:00
Riyyi cf1da45b78 Test: Update macro output formatting 2021-09-18 09:57:25 +02:00
Riyyi cc7252f94d Util: Change operators to the evaluated order 2021-09-17 19:13:57 +02:00
Riyyi 26ceceeba5 Util: Change System to direct-list-initialization 2021-09-17 13:02:29 +02:00
Riyyi 9926849640 Util: Add class Shell for executing more basic OS shell commands 2021-09-17 12:52:36 +02:00
Riyyi 496e3e4c88 Util: Do not modify the output result 2021-09-17 01:41:21 +02:00
Riyyi 06367a05b8 Util: Add additional System operator support 2021-09-17 01:13:07 +02:00
Riyyi 2fca315557 Util: Add support for stdin and | piping
In order to accomplish this, the arguments have to be stored in the
object. Because () evaluation order is not defined in the spec.

Because arguments have to be stored now, char pointers no longer work
and std::strings are stored instead. Systems object also cant be
returned as a reference anymore because you need to be able to know
which is the lhs and which is the rhs in the operator overloads.
2021-09-16 18:11:47 +02:00
Riyyi 70ccdee8c2 Util: Add class System for executing OS shell commands 2021-09-15 12:22:04 +02:00
Riyyi 3efe74582f Util: Add ArgParser missing argument error message 2021-09-13 19:54:59 +02:00
Riyyi bb29919f02 Util: Simplify the logic of the long option parsing function 2021-09-13 17:42:34 +02:00
Riyyi 2ac6d24520 Util: Add type error messages to ArgParser option arguments 2021-09-13 16:19:49 +02:00
Riyyi 648c0f8c85 Util: Rename ArgParser error types 2021-09-13 15:22:12 +02:00
Riyyi 35e2c2de48 Util: Rename printOptionError -> printError 2021-09-13 15:17:37 +02:00
Riyyi ffcde408e1 Util: Add invalid argument type error message to ArgParser 2021-09-13 12:04:44 +02:00
Riyyi 9c918c6555 Util: Add ArgParser unhandled argument error type and messages 2021-09-13 04:04:02 +02:00
Riyyi a5d5d2ea6d Util: Fix nullptr derefencing
In order to compare strings, the STL has to dereference the data
pointer. So check if its not a nullptr first.
2021-09-13 03:59:51 +02:00
Riyyi 7759821b13 Util: Fix string_view substring selection
Unlike std::basic_string::data() and string literals, data() may return
a pointer to a buffer that is not null-terminated. Therefore it is
typically a mistake to pass data() to a routine that takes just a const
CharT* and expects a null-terminated string.

The bug was calling string_view .data() after calling substr() that ends
before the null terminator, as it will just return the entire
string_view.
2021-09-13 00:58:51 +02:00
Riyyi a217475d42 Util: Avoid assigning variable by passing to the initialization list
When an object of a class is created, the constructors of all member
variables are called consecutively in the order the variables are
declared, even if you don't explicitly write them to the initialization
list.
2021-09-13 00:20:38 +02:00
Riyyi 8ce4643518 Test: Add optional argument test cases 2021-09-12 21:13:44 +02:00
Riyyi b6bfcbdc33 Util: Support for optional arguments in ArgParser 2021-09-09 15:14:17 +02:00
Riyyi ca95ef1cf1 Util: Add simple validation to ArgParser number conversions 2021-09-09 12:30:45 +02:00
Riyyi 6efa314c38 Util: Move ArgParser private function implementations to the bottom 2021-09-09 11:44:44 +02:00
Riyyi 4e30b58305 Util: Switch ArgParser option/argument creation to list initialization 2021-09-09 11:40:13 +02:00
Riyyi 0fffa86ba0 Util: Deduplicate ArgParser accept value lambdas 2021-09-09 11:23:13 +02:00
Riyyi 9cecb8602f Util: Add more ArgParser argument types 2021-09-09 00:12:06 +02:00
Riyyi 9796bc9e86 Test: Add argument test cases 2021-09-08 23:48:26 +02:00
Riyyi 67fd31a746 Util: Add argument parsing to ArgParser 2021-09-08 23:46:10 +02:00
Riyyi 952ba588f7 Test: Check non existent arguments 2021-09-08 21:54:51 +02:00
Riyyi dc4fcc10ce Util+Test: Implement exit on first error in main ArgParser loop 2021-09-07 18:14:14 +02:00
Riyyi f021cf0e15 Util: Fix parsing for exit on first error setting 2021-09-07 00:54:16 +02:00
Riyyi 3f1ced53f6 Util: Rename variable to plural 2021-09-07 00:20:29 +02:00
Riyyi 1c887bbaf7 Test: Print expect macros to stderr
Also now properly reporting test case failure.
2021-09-06 20:37:39 +02:00
Riyyi f92b75a463 Util+Test: Add setting to stop parsing on first non-option 2021-09-06 20:37:39 +02:00
Riyyi a70d67f8fa Util: Don't try to parse a '--' parameter 2021-09-06 14:43:12 +02:00
Riyyi 072d805344 Util+Test: Add more ArgParser option types 2021-09-06 12:22:30 +02:00
Riyyi 98dec3e51a Util: Handle accepting values return state in ArgParser 2021-09-06 12:17:12 +02:00
Riyyi 1366bf14b1 Util+Test: Change size_type to size_t
The specialized size_type type is just an alias for size_t.
2021-09-06 01:59:08 +02:00
Riyyi 68cdd625b4 Util+Test: Add parsing of multi-value options 2021-09-06 00:08:04 +02:00
Riyyi a5c422a2cc Util+Test: Add support for '--' to enable non-option mode 2021-09-05 23:39:08 +02:00
Riyyi 04482fb10d Util: Return the result of the option parsing 2021-09-05 22:56:34 +02:00
Riyyi e813ab0f73 Test: Add test cases for string options 2021-09-05 22:56:20 +02:00
Riyyi d423fec3c5 Test: Add "not equal" macro 2021-09-05 21:13:16 +02:00
Riyyi a932079f21 Test: Improve suite print formatting 2021-09-05 21:06:10 +02:00
Riyyi 2b2bd7ff78 Util: Add fancyprint function 2021-09-05 20:59:45 +02:00
Riyyi f6ce86dba7 Util: Fix typo in timer 2021-09-05 20:59:17 +02:00
Riyyi 93b5ac609e Test: Capitalize function type 2021-09-05 19:08:52 +02:00
Riyyi 422224bf1c Test: Implement timer 2021-09-05 19:08:28 +02:00
Riyyi 86aeae3c8e Util: Add timer class 2021-09-05 19:08:07 +02:00
Riyyi 17bceeb619 Test: Add ArgParser tests 2021-09-05 10:52:04 +02:00
Riyyi 4df96a6c75 Test: Implement simple TestSuite/TestCase 2021-09-05 10:50:48 +02:00
Riyyi eaec2c0e7a Util: Add singleton class 2021-09-05 10:49:28 +02:00
Riyyi 8a1fb689bd Initial commit 2021-09-04 21:12:20 +02:00