Browse code

* allow system specific repositories

Nat! authored on 04/09/2017 14:56:23
Showing 1 changed files
... ...
@@ -81,7 +81,25 @@ _bootstrap_auto_copy()
81 81
    do
82 82
       IFS="${DEFAULT_IFS}"
83 83
 
84
+      #
85
+      # os specific overrides present, skip dis
86
+      #
87
+      if [ -f "${name}.${UNAME}" ]
88
+      then
89
+         continue
90
+      fi
91
+
84 92
       filepath="${tmpdir}/${name}"
93
+
94
+      #
95
+      # cut off os specific for general name
96
+      #
97
+      case "${name}" in
98
+         *".${UNAME}")
99
+            name="${name%.*}"
100
+         ;;
101
+      esac
102
+
85 103
       dstfilepath="${dst}/${name}"
86 104
 
87 105
       # only inherit, don't override
... ...
@@ -303,18 +321,37 @@ _bootstrap_auto_merge_root_settings()
303 303
 
304 304
       settingname="`basename -- "${i}"`"
305 305
       srcfile="${directory}/.bootstrap/${settingname}"
306
+
306 307
       if [ -d "${srcfile}" ]
307 308
       then
308 309
          # log_fluff "Directory \"${srcfile}\" not copied"
309 310
          continue
310 311
       fi
311 312
 
313
+      #
314
+      # os specific overrides present, skip dis
315
+      #
316
+      if [ -f "${srcfile}.${UNAME}" ]
317
+      then
318
+         continue
319
+      fi
320
+
321
+      #
322
+      # cut off os specific for general name
323
+      #
324
+      case "${settingname}" in
325
+         *".${UNAME}")
326
+            settingname="${settingname%.*}"
327
+         ;;
328
+      esac
329
+
312 330
       dstfile="${dst}/${settingname}"
313 331
 
314 332
       #
315 333
       # "repositories" files gets special treatment
316 334
       # "additional_repositories" is just a local patch thing
317 335
       # "embedded_repositories" is not merged though
336
+      #
318 337
       case "${settingname}" in
319 338
          "embedded_repositories"|"minions")
320 339
             continue  # done by caller