Squash commits for public release

This commit is contained in:
2025-02-12 09:54:05 -05:00
commit 7118adc514
1108 changed files with 80873 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
APPS += RMDIR
RMDIR_NAME = rmdir
RMDIR_LIBS = c
RMDIR_INSTALL_PATH = bin/

View File

@@ -0,0 +1,8 @@
import("//build/userland/TEMPLATE.gni")
xOS_executable("rmdir") {
install_path = "bin/"
sources = [ "main.c" ]
configs = [ "//build/userland:userland_flags" ]
deplibs = [ "libc" ]
}

View File

@@ -0,0 +1,19 @@
#include <stdio.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (argc < 2) {
printf("Usage: rmdir files...\n");
return 0;
}
for (int i = 1; i < argc; i++) {
if (rmdir(argv[i]) < 0) {
printf("rmdir: failed to delete\n");
break;
}
}
return 0;
}