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
     local found=false
400
     local found=false
401
     while read -r path;
401
     while read -r path;
402
     do
402
     do
403
-        test -f "$path" || continue
404
         found=true
403
         found=true
405
         case $Strategy in
404
         case $Strategy in
406
             first)
405
             first)
430
     # with 'first' strategy, first existing file is printed, with
429
     # with 'first' strategy, first existing file is printed, with
431
     # 'join' strategy. all existing files are printed.
430
     # 'join' strategy. all existing files are printed.
432
     #
431
     #
433
-    local arg trydir trypath es
432
+    local arg es
434
     es=0
433
     es=0
435
     for arg in "$@";
434
     for arg in "$@";
436
     do
435
     do
439
                 cat "$arg" || es=3
438
                 cat "$arg" || es=3
440
             ;;
439
             ;;
441
         *)              # name given, find all its incarnations
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
               |  _saturnin__conf__merge; es=$?
442
               |  _saturnin__conf__merge; es=$?
452
             ;;
443
             ;;
453
         esac
444
         esac