Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
luxe committed Aug 9, 2024
1 parent 783ba0f commit 2b34266
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ boost::program_options::options_description Program_Options::Get_Options_Descrip
("dir",value<std::string>(),"the dir to remove headers from")
("target",value<std::string>(),"target to check with")
("commands",value<std::vector<std::string>>(),"commands to check with")
("start-at",value<int>(),"where to start in the file iteration")

//+----------------------------------------------------------+
//| Obligatory |
Expand Down Expand Up @@ -136,6 +137,15 @@ std::string Program_Options::Dir() const{
return data;
}

int Program_Options::Start_At() const{
int data = 0;
if (vm.count("start-at")){
data = vm["start-at"].as<std::string>();
}

return data;
}

std::vector<std::string> Program_Options::Commands() const{
std::vector<std::string> data;
if (vm.count("commands")){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Program_Options {
std::string Dir() const;
std::string Target() const;
std::vector<std::string> Commands() const;
int Start_At() const;


std::string Get_Help_Message();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class
//get all the files to prune
auto files = Get_All_Files_To_Prune(options);
std::cout << "Files to prune: " << files.size();
for (size_t i = 0; i < files.size(); ++i){
for (size_t i = options.Start_At(); i < files.size(); ++i){
std::cout << "[ " << i+1 << " / " << files.size() << " ]" << std::endl;
Prune_File(files[i],options);
}
Expand Down

0 comments on commit 2b34266

Please sign in to comment.