aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/meta/read_config_files.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/meta/read_config_files.d')
-rw-r--r--src/sdp/meta/read_config_files.d27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/sdp/meta/read_config_files.d b/src/sdp/meta/read_config_files.d
index 012ccb6..369d9c2 100644
--- a/src/sdp/meta/read_config_files.d
+++ b/src/sdp/meta/read_config_files.d
@@ -7,32 +7,11 @@ module sdp.meta.read_config_files;
static template configIn() {
import
sdp.meta,
+ sdp.output.paths_source,
std.file,
std.path;
final string configIn(C,E)(C conf_sdl, E env) {
- /+ FIX clean up conf paths ↓ +/
- string sisudoc_conf_pwd = chainPath(to!string(env["pwd"]), "sisudoc/conf").array;
- string sisudoc_conf_pwd_a = chainPath(to!string(env["pwd"]), "conf").array;
- string sisudoc_conf_pwd_b = chainPath(to!string(env["pwd"]), "../conf").array;
- string sisudoc_conf_pwd_c = chainPath(to!string(env["pwd"]), "../../conf").array;
- string sisudoc_conf_pwd_d = chainPath(to!string(env["pwd"]), "../../../conf").array;
- /+ FIX clean up conf paths ↑
- (compare pwd to doc path location, and build config path)
- +/
- string dot_pwd = chainPath(to!string(env["pwd"]), ".sisu").array;
- string underscore_pwd = chainPath(to!string(env["pwd"]), "_sisu").array;
- string dot_home = chainPath(to!string(env["home"]), ".sisu").array;
- string[] possible_config_path_locations = [
- sisudoc_conf_pwd,
- sisudoc_conf_pwd_a,
- sisudoc_conf_pwd_b,
- sisudoc_conf_pwd_c,
- sisudoc_conf_pwd_d,
- dot_pwd,
- underscore_pwd,
- dot_home,
- "/etc/sisu"
- ];
+ auto possible_config_path_locations = ConfigFilePaths!()(env).possible_config_path_locations;
string config_file_str;
foreach(pth; possible_config_path_locations) {
auto conf_file = format(
@@ -67,6 +46,7 @@ static template ConfigSDLang() {
import sdlang;
import
sdp.meta,
+ sdp.output.paths_source,
std.file,
std.path;
auto ConfigSDLang(string configuration, string conf_sdl_filename) {
@@ -86,6 +66,7 @@ static template ConfigSDLang() {
static template configRead() {
import
sdp.meta,
+ sdp.output.paths_source,
std.file,
std.path;