blob: 2a33c2c0e8c6defd13851e31d8179cb4186bbb15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include <iostream>
#include <fstream>
#include "ensure_repo.hh"
#include "vars.hh"
void ensure_repo() {
if (!std::filesystem::exists(repo_file)) {
std::cout << "repo file does not exist" << std::endl;
std::ofstream file;
file.open(repo_file);
if (!file.is_open()) {
std::cout << print_error << "repo file not created" << std::endl;
return;
}
file << "repos = {}" << std::endl;
file << "repos[\"pkgit\"] = https://git.symlinx.net/pkgit" << std::endl;
std::cout << repo_file << std::endl;
file.close();
}
}
|