-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
38 lines (31 loc) · 835 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main(int argc, char* argv[]) {
/*if(argc < 2){
cout << "Usage: " << argv[0] << "<PathToFile>";
return 1;
}*/
string commands = "cd /home/$USER/Documents; mkdir -p repoes; cd repoes" ;
ifstream file;
//file.open(argv[1], "r");
file.open("/home/dellboy/Documents/dashboard/links.txt");
string links[50];
int i = 0;
//links.reserve(10);
if (file.is_open()) {
for (string line; getline(file,line);){
links[i] = line;
//cout << links[i]<< endl;
i++;
}
//cout << i << endl;
}
for (int j = 0; j < i; ++j) {
commands += "; git clone " + links[j];
}
//cout << commands;
system(commands.c_str());
return 0;
}