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 392
 
387 393
    log_info "Recursively acquiring ${dir} .bootstrap settings ..."
388 394
 
395
+   local old
396
+
397
+   old="${IFS:-" "}"
398
+
389 399
    #
390 400
    # prepare auto folder if it doesn't exist yet
391 401
    # means copy our own files to .auto first,
... ...
@@ -396,8 +406,11 @@ bootstrap_auto_update()
396 406
 
397 407
       mkdir_if_missing "${BOOTSTRAP_SUBDIR}.tmp/settings"
398 408
 
409
+      IFS="
410
+"
399 411
       for i in $INHERIT_SETTINGS
400 412
       do
413
+         IFS="${old}"
401 414
          if [ -f "${BOOTSTRAP_SUBDIR}.local/${i}" ]
402 415
          then
403 416
             exekutor cp "${BOOTSTRAP_SUBDIR}.local/${i}" "${BOOTSTRAP_SUBDIR}.tmp/${i}" || exit 1
... ...
@@ -410,6 +423,7 @@ bootstrap_auto_update()
410 423
             fi
411 424
          fi
412 425
       done
426
+      IFS="${old}"
413 427
 
414 428
       # now move it
415 429
       exekutor mv "${BOOTSTRAP_SUBDIR}.tmp" "${BOOTSTRAP_SUBDIR}.auto" || exit 1
... ...
@@ -425,8 +439,11 @@ bootstrap_auto_update()
425 439
    local dstfile
426 440
    local i
427 441
 
442
+   IFS="
443
+"
428 444
    for i in $INHERIT_SETTINGS
429 445
    do
446
+      IFS="{old}"
430 447
       srcfile="${dir}/.bootstrap/${i}"
431 448
       dstfile="${BOOTSTRAP_SUBDIR}.auto/${i}"
432 449
       if [ -f "${srcfile}" ]
... ...
@@ -450,6 +467,7 @@ bootstrap_auto_update()
450 467
          log_fluff "Setting \"`basename -- ${i}`\" is not specified, so not inherited"
451 468
       fi
452 469
    done
470
+   IFS="{old}"
453 471
 
454 472
    # link scm files over, that we find
455 473
    local relative