aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/default_paths.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/default_paths.org')
-rw-r--r--org/default_paths.org65
1 files changed, 43 insertions, 22 deletions
diff --git a/org/default_paths.org b/org/default_paths.org
index e18d3a5..93711dc 100644
--- a/org/default_paths.org
+++ b/org/default_paths.org
@@ -199,25 +199,15 @@ template ConfigFilePaths() {
E _env,
) {
struct ConfFilePaths {
- auto possible_config_path_locations() {
+ auto possible_config_path_locations_document() {
/+ FIX clean up conf paths ↓ +/
/+ config local site (file system only, not in pod) +/
- string _dot_pwd;
- string _underscore_pwd;
- string _dot_home;
- /+ config document (& or local site) on filesystem +/
- string _sisudoc_conf_pwd; // think about
- string _sisudoc_conf_pwd_a;
- string _sisudoc_conf_pwd_b;
- string _sisudoc_conf_pwd_c;
- string _sisudoc_conf_pwd_d;
- /+ config document in pod +/
- string _sisudoc_conf_pod;
- string _sisudoc_conf_pod_text;
/+ return paths +/
string[] _possible_config_path_locations;
if (_manifest.is_pod) {
/+ config document in pod +/
+ string _sisudoc_conf_pod;
+ string _sisudoc_conf_pod_text;
_sisudoc_conf_pod = asNormalizedPath(chainPath(
to!string(_env["pwd"]),
_manifest.pod_manifest_path ~ "/conf"
@@ -232,16 +222,12 @@ template ConfigFilePaths() {
_sisudoc_conf_pod,
];
} else {
- /+ config local site (file system only, not in pod) +/
- _dot_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), ".sisu")).array;
- _underscore_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "_sisu")).array;
- _dot_home = asNormalizedPath(chainPath(to!string(_env["home"]), ".sisu")).array;
/+ config document (& or local site) on filesystem +/
- _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about
- _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array;
- _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array;
- _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array;
- _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array;
+ string _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about
+ string _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array;
+ string _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array;
+ string _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array;
+ string _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array;
/+ return paths +/
_possible_config_path_locations = [
_sisudoc_conf_pwd,
@@ -249,6 +235,41 @@ template ConfigFilePaths() {
_sisudoc_conf_pwd_b,
_sisudoc_conf_pwd_c,
_sisudoc_conf_pwd_d,
+ ];
+ }
+ /+ FIX clean up conf paths ↑
+ (compare pwd to doc path location, and build config path)
+ +/
+ return _possible_config_path_locations;
+ }
+ auto possible_config_path_locations_local_site() {
+ /+ FIX clean up conf paths ↓ +/
+ /+ config local site (file system only, not in pod) +/
+ string _dot_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), ".sisu")).array;
+ string _underscore_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "_sisu")).array;
+ string _dot_home = asNormalizedPath(chainPath(to!string(_env["home"]), ".sisu")).array;
+ /+ return paths +/
+ string[] _possible_config_path_locations;
+ if (_manifest.is_pod) {
+ _possible_config_path_locations = [
+ _dot_pwd,
+ _underscore_pwd,
+ _dot_home,
+ "/etc/sisu"
+ ];
+ } else {
+ /+ config document (& or local site) on filesystem +/
+ string _sisudoc_conf_pwd = asNormalizedPath(chainPath(to!string(_env["pwd"]), "sisudoc/conf")).array; // think about
+ string _sisudoc_conf_pwd_a = asNormalizedPath(chainPath(to!string(_env["pwd"]), "conf")).array;
+ string _sisudoc_conf_pwd_b = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../conf")).array;
+ string _sisudoc_conf_pwd_c = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../conf")).array;
+ string _sisudoc_conf_pwd_d = asNormalizedPath(chainPath(to!string(_env["pwd"]), "../../../conf")).array;
+ _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,