mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
rmdir: Port to LibMain
This commit is contained in:
parent
0fea2203dc
commit
790274d4a5
2 changed files with 6 additions and 6 deletions
|
@ -150,6 +150,7 @@ target_link_libraries(ps LibMain)
|
|||
target_link_libraries(pwd LibMain)
|
||||
target_link_libraries(rev LibMain)
|
||||
target_link_libraries(rm LibMain)
|
||||
target_link_libraries(rmdir LibMain)
|
||||
target_link_libraries(run-tests LibRegex)
|
||||
target_link_libraries(shot LibGUI)
|
||||
target_link_libraries(shuf LibMain)
|
||||
|
|
|
@ -6,21 +6,20 @@
|
|||
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
if (pledge("stdio cpath", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
TRY(Core::System::pledge("stdio cpath"));
|
||||
|
||||
Vector<const char*> paths;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.add_positional_argument(paths, "Directories to remove", "paths");
|
||||
args_parser.parse(argc, argv);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
int status = 0;
|
||||
for (auto path : paths) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue