Browse Source

Use new config file finder when loading config file

Alois Mahdal 7 years ago
parent
commit
808357690c
1 changed files with 2 additions and 11 deletions
  1. 2
    11
      src/saturnin.sh.skel

+ 2
- 11
src/saturnin.sh.skel View File

@@ -400,7 +400,6 @@ _saturnin__conf__merge() {
400 400
     local found=false
401 401
     while read -r path;
402 402
     do
403
-        test -f "$path" || continue
404 403
         found=true
405 404
         case $Strategy in
406 405
             first)
@@ -430,7 +429,7 @@ _saturnin__conf__load() {
430 429
     # with 'first' strategy, first existing file is printed, with
431 430
     # 'join' strategy. all existing files are printed.
432 431
     #
433
-    local arg trydir trypath es
432
+    local arg es
434 433
     es=0
435 434
     for arg in "$@";
436 435
     do
@@ -439,15 +438,7 @@ _saturnin__conf__load() {
439 438
                 cat "$arg" || es=3
440 439
             ;;
441 440
         *)              # name given, find all its incarnations
442
-            debug -v SATURNIN_CONF_PATH
443
-            echos "$SATURNIN_CONF_PATH" \
444
-              | tr ':' '\n' \
445
-              | while read -r trydir;
446
-                do
447
-                    test -n "$trydir" || continue
448
-                    trypath="$trydir/$arg"
449
-                    echos "$trypath"
450
-                done \
441
+            saturnin__conf_find "$arg" \
451 442
               |  _saturnin__conf__merge; es=$?
452 443
             ;;
453 444
         esac