File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ boost::program_options::options_description Program_Options::Get_Options_Descrip
42
42
(" dir" ,value<std::string>()," the dir to remove headers from" )
43
43
(" target" ,value<std::string>()," target to check with" )
44
44
(" commands" ,value<std::vector<std::string>>()," commands to check with" )
45
+ (" start-at" ,value<int >()," where to start in the file iteration" )
45
46
46
47
// +----------------------------------------------------------+
47
48
// | Obligatory |
@@ -136,6 +137,15 @@ std::string Program_Options::Dir() const{
136
137
return data;
137
138
}
138
139
140
+ int Program_Options::Start_At () const {
141
+ int data = 0 ;
142
+ if (vm.count (" start-at" )){
143
+ data = vm[" start-at" ].as <std::string>();
144
+ }
145
+
146
+ return data;
147
+ }
148
+
139
149
std::vector<std::string> Program_Options::Commands () const {
140
150
std::vector<std::string> data;
141
151
if (vm.count (" commands" )){
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class Program_Options {
22
22
std::string Dir () const ;
23
23
std::string Target () const ;
24
24
std::vector<std::string> Commands () const ;
25
+ int Start_At () const ;
25
26
26
27
27
28
std::string Get_Help_Message ();
Original file line number Diff line number Diff line change 34
34
//get all the files to prune
35
35
auto files = Get_All_Files_To_Prune(options);
36
36
std::cout << "Files to prune: " << files.size();
37
- for (size_t i = 0 ; i < files.size(); ++i){
37
+ for (size_t i = options.Start_At() ; i < files.size(); ++i){
38
38
std::cout << "[ " << i+1 << " / " << files.size() << " ]" << std::endl;
39
39
Prune_File(files[i],options);
40
40
}
You can’t perform that action at this time.
0 commit comments