From aa0d78815004ae6b0c4a42b0e024f5c4ef555ae2 Mon Sep 17 00:00:00 2001 From: dacctal Date: Sun, 24 May 2026 10:23:38 +0000 Subject: c rewrite --- src/copy_install.cc | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/copy_install.cc (limited to 'src/copy_install.cc') diff --git a/src/copy_install.cc b/src/copy_install.cc deleted file mode 100644 index a87fa21..0000000 --- a/src/copy_install.cc +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -#include -#include - -#include "copy_install.hh" -#include "vars.hh" - -void copy_install(std::filesystem::path build_dir) { - for (auto const& dir_entry : std::filesystem::recursive_directory_iterator(build_dir)) { - if (dir_entry.path().extension().string().rfind(".so", 0) == 0) { - if (!std::filesystem::exists(install_directories["lib"]+"/"+dir_entry.path().filename().string())) { - copy(dir_entry, install_directories["lib"]+"/"+dir_entry.path().filename().string()); - if (is_verbose) { std::cout << print_pkgit << "copied library: " << dir_entry << "\n"; } - } else { /*std::cout << print_pkgit << "library already exists: " << dir_entry << "\n";*/ } - - } else if (!access(dir_entry.path().c_str(), X_OK) && !is_directory(dir_entry.path())) { - if (!std::filesystem::exists(install_directories["bin"]+"/"+dir_entry.path().filename().string()) && - dir_entry.path().extension() != ".sample" && - dir_entry.path().filename().string() != "bldit" && - dir_entry.path().filename().string() != "build.sh" && - dir_entry.path().filename().string() != "compile.sh") { - copy(dir_entry, install_directories["bin"]+"/"+dir_entry.path().filename().string()); - if (is_verbose) { std::cout << print_pkgit << "copied executable: " << dir_entry << "\n"; } - } else { /*std::cout << print_pkgit << "executable already exists: " << dir_entry << "\n";*/ } - - } else if (dir_entry.path().extension() == ".h") { - if (!std::filesystem::exists(install_directories["include"]+"/"+dir_entry.path().filename().string())) { - copy(dir_entry, install_directories["include"]+"/"+dir_entry.path().filename().string()); - if (is_verbose) { std::cout << print_pkgit << "copied include: " << dir_entry << "\n"; } - } else { /*std::cout << print_pkgit << "include already exists: " << dir_entry << "\n";*/ } - } - } -} -- cgit v1.2.3