Browse code

try to fix suspected IFS bug

Nat! authored on 04/01/2016 01:20:28
Showing 1 changed files
... ...
@@ -361,7 +361,13 @@ ask_symlink_it()
361 361
 }
362 362
 
363 363
 
364
-INHERIT_SETTINGS='taps brews repositories pips gems settings/build_order settings/build_ignore'
364
+INHERIT_SETTINGS='taps
365
+brews
366
+repositories
367
+pips
368
+gems
369
+settings/build_order
370
+settings/build_ignore'
365 371
 
366 372
 bootstrap_auto_update()
367 373
 {
... ...
@@ -386,6 +392,10 @@ bootstrap_auto_update()
386 386
 
387 387
    log_info "Recursively acquiring ${dir} .bootstrap settings ..."
388 388
 
389
+   local old
390
+
391
+   old="${IFS:-" "}"
392
+
389 393
    #
390 394
    # prepare auto folder if it doesn't exist yet
391 395
    # means copy our own files to .auto first,
... ...
@@ -396,8 +406,11 @@ bootstrap_auto_update()
396 396
 
397 397
       mkdir_if_missing "${BOOTSTRAP_SUBDIR}.tmp/settings"
398 398
 
399
+      IFS="
400
+"
399 401
       for i in $INHERIT_SETTINGS
400 402
       do
403
+         IFS="${old}"
401 404
          if [ -f "${BOOTSTRAP_SUBDIR}.local/${i}" ]
402 405
          then
403 406
             exekutor cp "${BOOTSTRAP_SUBDIR}.local/${i}" "${BOOTSTRAP_SUBDIR}.tmp/${i}" || exit 1
... ...
@@ -410,6 +423,7 @@ bootstrap_auto_update()
410 410
             fi
411 411
          fi
412 412
       done
413
+      IFS="${old}"
413 414
 
414 415
       # now move it
415 416
       exekutor mv "${BOOTSTRAP_SUBDIR}.tmp" "${BOOTSTRAP_SUBDIR}.auto" || exit 1
... ...
@@ -425,8 +439,11 @@ bootstrap_auto_update()
425 425
    local dstfile
426 426
    local i
427 427
 
428
+   IFS="
429
+"
428 430
    for i in $INHERIT_SETTINGS
429 431
    do
432
+      IFS="{old}"
430 433
       srcfile="${dir}/.bootstrap/${i}"
431 434
       dstfile="${BOOTSTRAP_SUBDIR}.auto/${i}"
432 435
       if [ -f "${srcfile}" ]
... ...
@@ -450,6 +467,7 @@ bootstrap_auto_update()
450 450
          log_fluff "Setting \"`basename -- ${i}`\" is not specified, so not inherited"
451 451
       fi
452 452
    done
453
+   IFS="{old}"
453 454
 
454 455
    # link scm files over, that we find
455 456
    local relative