Просмотр исходного кода

Respect old SATURNIN_CONF_PATH when creating new one

This allows prepending config locations to Saturnin.  This should be
normally used only in cases of staged installattions, such as in sanity
tests.
Alois Mahdal 7 лет назад
Родитель
Сommit
a35ab6f1df
1 измененных файлов: 12 добавлений и 6 удалений
  1. 12
    6
      src/saturnin.sh.skel

+ 12
- 6
src/saturnin.sh.skel Просмотреть файл

@@ -408,16 +408,22 @@ saturnin__help() {
408 408
 
409 409
 saturnin__conf_mkpath() {
410 410
     #
411
-    # Assemble SATURNIN_CONF_PATH from locations $@
411
+    # Print new $SATURNIN_CONF_PATH by appending locations $@
412 412
     #
413
-    # For each location, print colon-delimited list of directories.  If
414
-    # location ends with "/ini.d", list of subfolders, sorted by C locale is
415
-    # printed--this allows for modular configuration.  Otherwise the
416
-    # location is printed.  Non-existent or non-directory locations are
417
-    # silently ignored.
413
+    # Usage:
414
+    #
415
+    #     saturnin__conf_mkpath DIR [DIR..]
416
+    #
417
+    # First repeat elements of $SATURNIN_CONF_PATH unless it's empty.
418
+    # Then go through each DIR and print it, unless it ends with "/ini.d",
419
+    # in which case list its subdirectories, sorted by C locale (this allows
420
+    # for modular configuration).
421
+    #
422
+    # Non-existent or non-directory items are silently ignored.
418 423
     #
419 424
     local location      # one location argument
420 425
     local path          # one path listed
426
+    test -n "$SATURNIN_CONF_PATH" && echo -n "$SATURNIN_CONF_PATH:"
421 427
     for location in "$@";
422 428
     do
423 429
         test -d "$location" || continue