diff options
| author | dacctal <dacctal@symlinx.net> | 2026-05-25 04:13:07 +0000 |
|---|---|---|
| committer | dacctal <dacctal@symlinx.net> | 2026-05-25 04:13:07 +0000 |
| commit | 013b7f659985b540e549599ed2e17adb9c81d858 (patch) | |
| tree | df56ee9e41c8610660e34e1d21014ac8a0fbc871 /src/remove.c | |
| parent | b916aeed79d56158a38f88d37ad51ef90f9a154d (diff) | |
frosty telling me one thing that fixes the entire codebase maybe this should just be his project
Diffstat (limited to 'src/remove.c')
| -rw-r--r-- | src/remove.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/remove.c b/src/remove.c new file mode 100644 index 0000000..ac8e8f9 --- /dev/null +++ b/src/remove.c @@ -0,0 +1,31 @@ +#include <stdio.h> +#include <dirent.h> +#include <string.h> +#include <sys/stat.h> +#include <sys/types.h> + +#include "files.h" +#include "vars.h" + +//void remove_pkg(Pkg pkg) { +// char* src_code = pkg.src; +// struct dirent* dirent_ptr; +// DIR* dir_ptr; +// +// if ((dir_ptr = opendir(src_code)) == NULL) { +// fprintf(stderr, "%scould not open %s\n", print_pkgit, src_code); +// } +// +// while ((dirent_ptr = readdir(dir_ptr)) != NULL) { +// struct stat stat_buf; +// FILE* file_ptr = fopen(dirent_ptr->d_name, "r"); +// if (!file_ptr) { continue; } +// if (strcmp(get_filename_ext(dirent_ptr->d_name), ".so") == 0) { +// remove(strcat(install_directories[], dirent_ptr->d_name)); +// } else if (!access(dir_entry.path().c_str(), X_OK) && !is_directory(dir_entry.path())) { +// std::filesystem::remove(install_directories["bin"]+"/"+dir_entry.path().filename().string()); +// } else if (dir_entry.path().extension() == ".h") { +// std::filesystem::remove(install_directories["include"]+"/"+dir_entry.path().filename().string()); +// } +// } +//} |
