Browse code

Made some necessary changes for Linux and Ubuntu's hated dash in particular. Fixed coloring, since I noticed, that not all terminals are necessarily black...

Nat! authored on 17-10-2015 00:05:45
Showing 17 changed files
... ...
@@ -1,3 +1,9 @@
1
+0.9.6
2
+===
3
+   Figured out that some terminal windows have a white background (duh).
4
+   Fixed shifts for Ubuntu's hated dash.
5
+   Fixed some other Linux problems.
6
+
1 7
 0.9.5
2 8
 ===
3 9
    Messed up the tagging somewhat... 0.9.1 and 0.9.2 were the same and
... ...
@@ -59,13 +65,13 @@
59 65
 
60 66
 0.6
61 67
 ===
62
-	Improve scripts handling and add a some new phases to
63
-	the proceedings. Actually the whole script stuff didn't work before...
68
+   Improve scripts handling and add a some new phases to
69
+   the proceedings. Actually the whole script stuff didn't work before...
64 70
    Scripts in general aren't documented yet, because it's still very much
65 71
    in fluctuation.
66 72
 
67
-	More output during setting inheritance. Fix proper inheritance of
68
-	build_order and build_ignore.
73
+   More output during setting inheritance. Fix proper inheritance of
74
+   build_order and build_ignore.
69 75
 
70 76
    Lots of en-passant bug fixes. Should be in general better than 0.5
71 77
 
... ...
@@ -8,9 +8,9 @@ HOMEPAGE="http://www.mulle-kybernetik.com/software/git/${TARGET}"
8 8
 DESC="A simple shell script based dependency manager for projects"
9 9
 
10 10
 VERSION="${1:-`./mulle-bootstrap version`}"
11
-shift
11
+[ $# -eq 0 ] || shift
12 12
 ARCHIVEURL="${1:-http://www.mulle-kybernetik.com/software/git/${TARGET}/tarball/$VERSION}"
13
-shift
13
+[ $# -eq 0 ] || shift
14 14
 
15 15
 set -e
16 16
 
... ...
@@ -21,13 +21,13 @@ trap 'printf "${C_RESET}"' TERM EXIT
21 21
 #
22 22
 
23 23
 prefix=${1:-"/usr/local"}
24
-shift
24
+[ $# -eq 0 ] || shift
25 25
 mode=${1:-755}
26
-shift
26
+[ $# -eq 0 ] || shift
27 27
 bin=${1:-"${prefix}/bin"}
28
-shift
28
+[ $# -eq 0 ] || shift
29 29
 libexec=${1:-"${prefix}/libexec/mulle-bootstrap"}
30
-shift
30
+[ $# -eq 0 ] || shift
31 31
 
32 32
 if [ "$prefix" = "" ] || [ "$bin" = "" ] || [ "$libexec" = "" ] || [ "$mode" = "" ]
33 33
 then
... ...
@@ -35,14 +35,13 @@ then
35 35
    exit 1
36 36
 fi
37 37
 
38
-printf "${C_WHITE}"
39 38
 
40 39
 for i in mulle*bootstrap
41 40
 do
42 41
    mkdir -p "${bin}" 2> /dev/null
43 42
    sed "s|/usr/local/libexec/mulle-bootstrap|${libexec}|g" < "${i}" > "${bin}/$i" || exit 1
44 43
    chmod "${mode}" "${bin}/${i}" || exit 1
45
-   echo "install: ${C_MAGENTA}$bin/$i${C_WHITE}" >&2
44
+   echo "install: ${C_MAGENTA}$bin/$i${C_RESET}" >&2
46 45
 done
47 46
 
48 47
 
... ...
@@ -29,7 +29,7 @@
29 29
 #   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 
32
-VERSION=0.9.5
32
+VERSION=0.9.6
33 33
 
34 34
 #
35 35
 # This is the main user interface to mulle-bootstrap
... ...
@@ -47,13 +47,13 @@ if [ "$1" = "-a" ]
47 47
 then
48 48
    MULLE_BOOTSTRAP_ANSWER="NO"
49 49
    export MULLE_BOOTSTRAP_ANSWER
50
-   shift
50
+   [ $# -eq 0 ] || shift
51 51
 else
52 52
    if [ "$1" = "-y" ] #  basically auto symlink everything
53 53
    then
54 54
       MULLE_BOOTSTRAP_ANSWER="YES"
55 55
       export MULLE_BOOTSTRAP_ANSWER
56
-      shift
56
+      [ $# -eq 0 ] || shift
57 57
    fi
58 58
 fi
59 59
 
... ...
@@ -62,7 +62,7 @@ if [ "$1" = "-n" ]
62 62
 then
63 63
    MULLE_BOOTSTRAP_DRY_RUN="YES"
64 64
    export MULLE_BOOTSTRAP_DRY_RUN
65
-   shift
65
+   [ $# -eq 0 ] || shift
66 66
 fi
67 67
 
68 68
 if [ "$1" = "-t" ]
... ...
@@ -74,7 +74,7 @@ then
74 74
    export COPYMOVEFLAGS
75 75
    GITFLAGS="-v"
76 76
    export GITFLAGS
77
-   shift
77
+   [ $# -eq 0 ] || shift
78 78
 else
79 79
    if [ "$1" = "-v" ]
80 80
    then
... ...
@@ -88,7 +88,7 @@ else
88 88
       export COPYMOVEFLAGS
89 89
       GITFLAGS="-v"
90 90
       export GITFLAGS
91
-      shift
91
+      [ $# -eq 0 ] || shift
92 92
    else
93 93
       if [ "$1" = "-V" ]
94 94
       then
... ...
@@ -102,7 +102,7 @@ else
102 102
          export COPYMOVEFLAGS
103 103
          GITFLAGS="-v"
104 104
          export GITFLAGS
105
-         shift
105
+         [ $# -eq 0 ] || shift
106 106
       else
107 107
          if [ "$1" = "-s" ] # silent
108 108
          then
... ...
@@ -111,7 +111,7 @@ else
111 111
             export MULLE_BOOTSTRAP_TERSE
112 112
             GITFLAGS="-q"
113 113
             export GITFLAGS
114
-            shift
114
+            [ $# -eq 0 ] || shift
115 115
          fi
116 116
       fi
117 117
    fi
... ...
@@ -136,7 +136,16 @@ usage: mulle-bootstrap [-a|-y][-n][-v|-s|-t] [command] [--help]
136 136
 
137 137
  Common maintainer commands:
138 138
    init      : initializes a bootstrap project
139
+EOF
140
+
141
+   if [ "`uname`" = 'Darwin' ]
142
+   then
143
+      cat <<EOF
139 144
    xcode     : sets up the xcodeproj settings
145
+EOF
146
+   fi
147
+   
148
+cat <<EOF
140 149
    tag       : tag this project and fetched repositories
141 150
 
142 151
  Specialized commands:
... ...
@@ -159,7 +168,7 @@ EOF
159 168
 
160 169
 
161 170
 command=${1:-"bootstrap"}
162
-shift
171
+[ $# -eq 0 ] || shift
163 172
 
164 173
 
165 174
 bootstrap()
166 175
old mode 100644
167 176
new mode 100755
... ...
@@ -73,7 +73,7 @@ dispense_headers()
73 73
    local headers
74 74
    local suffix
75 75
 
76
-   log_fluff "Consider copying headers from ${C_WHITE}${src}${C_FLUFF}"
76
+   log_fluff "Consider copying headers from ${C_RESET}${src}${C_FLUFF}"
77 77
 
78 78
    if [ -d "${src}" ]
79 79
    then
... ...
@@ -84,11 +84,11 @@ dispense_headers()
84 84
          dst="${REFERENCE_DEPENDENCY_SUBDIR}${headers}"
85 85
          mkdir_if_missing "${dst}"
86 86
 
87
-         log_fluff "Copying ${C_WHITE}${src}${C_FLUFF} to ${C_WHITE}${dst}${C_FLUFF}"
88
-         exekutor find -x "${src}" ! -path "${src}" -depth 1 -type d -print0 | \
87
+         log_fluff "Copying ${C_RESET}${src}${C_FLUFF} to ${C_RESET}${dst}${C_FLUFF}"
88
+         exekutor find -x "${src}" ! -path "${src}" -mindepth 1 -maxdepth 1 -type d -print0 | \
89 89
             exekutor xargs -0 -J % mv ${COPYMOVEFLAGS} -n % "${dst}"
90 90
          [ $? -eq 0 ]  || exit 1
91
-         exekutor find -x "${src}" ! -path "${src}" -depth 1 \( -type f -o -type l \) -print0 | \
91
+         exekutor find -x "${src}" ! -path "${src}" -mindepth 1 -maxdepth 1 \( -type f -o -type l \) -print0 | \
92 92
             exekutor xargs -0 -J % mv ${COPYMOVEFLAGS} -n % "${dst}"
93 93
          [ $? -eq 0 ]  || exit 1
94 94
 
... ...
@@ -120,7 +120,7 @@ dispense_binaries()
120 120
 
121 121
    findtype2="l"
122 122
 
123
-   log_fluff "Consider copying binaries from ${C_WHITE}${src}${C_FLUFF} for type \"${findtype}/${findtype2}\""
123
+   log_fluff "Consider copying binaries from ${C_RESET}${src}${C_FLUFF} for type \"${findtype}/${findtype2}\""
124 124
 
125 125
    if [ -d "${src}" ]
126 126
    then
... ...
@@ -128,9 +128,9 @@ dispense_binaries()
128 128
       then
129 129
          dst="${REFERENCE_DEPENDENCY_SUBDIR}${subpath}${subdir}"
130 130
 
131
-         log_fluff "Copying ${C_WHITE}${src}${C_FLUFF} to ${C_WHITE}${dst}${C_FLUFF}"
131
+         log_fluff "Copying ${C_RESET}${src}${C_FLUFF} to ${C_RESET}${dst}${C_FLUFF}"
132 132
          mkdir_if_missing "${dst}"
133
-         exekutor find -x "${src}" ! -path "${src}" \( -type "${findtype}" -o -type "${findtype2}" \) -depth 1 -print0 | \
133
+         exekutor find -x "${src}" ! -path "${src}" \( -type "${findtype}" -o -type "${findtype2}" \) -mindepth 1 -maxdepth 1 -print0 | \
134 134
             exekutor xargs -0 -J % mv ${COPYMOVEFLAGS} -n % "${dst}"
135 135
          [ $? -eq 0 ]  || exit 1
136 136
       else
... ...
@@ -162,7 +162,7 @@ collect_and_dispense_product()
162 162
       return 0
163 163
    fi
164 164
 
165
-   log_info "Collecting and dispensing ${C_WHITE}${name}${C_INFO} ${C_MAGENTA}`basename "${subdir}"`${C_INFO} products "
165
+   log_info "Collecting and dispensing ${C_RESET}${name}${C_INFO} ${C_MAGENTA}`basename "${subdir}"`${C_INFO} products "
166 166
    #
167 167
    # probably should use install_name_tool to hack all dylib paths that contain .ref
168 168
    # (will this work with signing stuff ?)
... ...
@@ -247,8 +247,8 @@ collect_and_dispense_product()
247 247
       then
248 248
          dst="${REFERENCE_DEPENDENCY_SUBDIR}${usrlocal}"
249 249
 
250
-         log_fluff "Copying everything from ${C_WHITE}${src}${C_FLUFF} to ${C_WHITE}${dst}${C_FLUFF}"
251
-         exekutor find -x "${src}" ! -path "${src}" -depth 1 -print0 | \
250
+         log_fluff "Copying everything from ${C_RESET}${src}${C_FLUFF} to ${C_RESET}${dst}${C_FLUFF}"
251
+         exekutor find -x "${src}" ! -path "${src}" -mindepth 1 -maxdepth 1 -print0 | \
252 252
                exekutor xargs -0 -J % mv -v -n % "${dst}"
253 253
          [ $? -eq 0 ]  || fail "moving files from ${src} to ${dst} failed"
254 254
       fi
... ...
@@ -257,7 +257,7 @@ collect_and_dispense_product()
257 257
       then
258 258
          if dir_has_files "${BUILD_DEPENDENCY_SUBDIR}"
259 259
          then
260
-            log_fluff "Directory ${C_WHITE}${BUILD_DEPENDENCY_SUBDIR}${C_FLUFF} contained files after collect and dispense"
260
+            log_fluff "Directory ${C_RESET}${BUILD_DEPENDENCY_SUBDIR}${C_FLUFF} contained files after collect and dispense"
261 261
             log_fluff "--------------------"
262 262
             ( cd "${BUILD_DEPENDENCY_SUBDIR}" ; ls -lR >&2 )
263 263
             log_fluff "--------------------"
... ...
@@ -281,7 +281,7 @@ enforce_build_sanity()
281 281
    # these must not exist
282 282
    if [ -d "${BUILD_DEPENDENCY_SUBDIR}" ]
283 283
    then
284
-      fail "A previous build left ${C_WHITE}${BUILD_DEPENDENCY_SUBDIR}${C_ERROR}, can't continue"
284
+      fail "A previous build left ${C_RESET}${BUILD_DEPENDENCY_SUBDIR}${C_ERROR}, can't continue"
285 285
    fi
286 286
 }
287 287
 
... ...
@@ -375,9 +375,9 @@ build_log_name()
375 375
    local name
376 376
 
377 377
    tool="$1"
378
-   shift
378
+   [ $# -eq 0 ] || shift
379 379
    name="$1"
380
-   shift
380
+   [ $# -eq 0 ] || shift
381 381
 
382 382
    local logfile
383 383
    logfile="${BUILDLOG_SUBDIR}/${name}"
... ...
@@ -388,7 +388,7 @@ build_log_name()
388 388
       then
389 389
          logfile="${logfile}-${1}"
390 390
       fi
391
-      shift
391
+      [ $# -eq 0 ] || shift
392 392
    done
393 393
 
394 394
    echo "${logfile}.${tool}.log"
... ...
@@ -445,7 +445,7 @@ ${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} ..."
445 445
    logfile1="`build_log_name "${name}" "cmake" "${configuration}" "${sdk}"`"
446 446
    logfile2="`build_log_name "${name}" "make" "${configuration}" "${sdk}"`"
447 447
 
448
-   log_info "Build logs will be in ${C_WHITE}${logfile1}${C_INFO} and ${C_WHITE}${logfile2}${C_INFO}"
448
+   log_info "Build logs will be in ${C_RESET}${logfile1}${C_INFO} and ${C_RESET}${logfile2}${C_INFO}"
449 449
 
450 450
    owd="${PWD}"
451 451
    mkdir_if_missing "${builddir}"
... ...
@@ -552,7 +552,7 @@ ${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} ..."
552 552
    logfile1="`build_log_name "${name}" "configure" "${configuration}" "${sdk}"`"
553 553
    logfile2="`build_log_name "${name}" "make" "${configuration}" "${sdk}"`"
554 554
 
555
-   log_info "Build logs will be in ${C_WHITE}${logfile1}${C_INFO} and ${C_WHITE}${logfile2}${C_INFO}"
555
+   log_info "Build logs will be in ${C_RESET}${logfile1}${C_INFO} and ${C_RESET}${logfile2}${C_INFO}"
556 556
 
557 557
    owd="${PWD}"
558 558
    mkdir_if_missing "${builddir}"
... ...
@@ -922,7 +922,7 @@ ${info} ..."
922 922
    mkdir_if_missing "${BUILDLOG_SUBDIR}"
923 923
 
924 924
    logfile="`build_log_name "${name}" "xcodebuild" "${configuration}" "${targetname}" "${schemename}" "${sdk}"`"
925
-   log_info "Build log will be in ${C_WHITE}${logfile}${C_INFO}"
925
+   log_info "Build log will be in ${C_RESET}${logfile}${C_INFO}"
926 926
 
927 927
    set -f
928 928
 
... ...
@@ -1135,7 +1135,7 @@ build_script()
1135 1135
    mkdir_if_missing "${BUILDLOG_SUBDIR}"
1136 1136
    logfile="${BUILDLOG_SUBDIR}/${name}-${configuration}-${sdk}.script.log"
1137 1137
 
1138
-   log_info "Build log will be in ${C_WHITE}${logfile}${C_INFO}"
1138
+   log_info "Build log will be in ${C_RESET}${logfile}${C_INFO}"
1139 1139
 
1140 1140
    local owd
1141 1141
 
... ...
@@ -1190,10 +1190,17 @@ build()
1190 1190
    preferences="`read_build_setting "${name}" "build_preferences"`"
1191 1191
    if [ -z "${preferences}" ]
1192 1192
    then
1193
-      preferences="`read_config_setting "build_preferences" "script
1193
+      if [ "`uname`" = 'Darwin' ]
1194
+      then
1195
+         preferences="`read_config_setting "build_preferences" "script
1194 1196
 xcodebuild
1195 1197
 cmake
1196 1198
 configure"`"
1199
+      else
1200
+         preferences="`read_config_setting "build_preferences" "script
1201
+cmake
1202
+configure"`"
1203
+      fi
1197 1204
    fi
1198 1205
 
1199 1206
    configurations="`read_build_root_setting "configurations" "Debug
... ...
@@ -1478,7 +1485,7 @@ install_tars()
1478 1485
          then
1479 1486
             fail "tarball \"$tar\" not found"
1480 1487
          else
1481
-            log_info "Installing tarball ${C_WHITE}${tar}${C_INFO}"
1488
+            log_info "Installing tarball ${C_RESET}${tar}${C_INFO}"
1482 1489
             exekutor tar -xz -C "${DEPENDENCY_SUBDIR}" -f "${tar}" || fail "failed to extract ${tar}"
1483 1490
          fi
1484 1491
       done
... ...
@@ -1521,7 +1528,7 @@ main()
1521 1528
       exekutor ln -s "usr/local/include" "${DEPENDENCY_SUBDIR}/include" || fail "failed to symlink future usr/local/include"
1522 1529
       install_tars "$@"
1523 1530
    else
1524
-      log_warning "Tars have not been installed, as ${C_WHITE}${DEPENDENCY_SUBDIR}${C_WARNING} already exists."
1531
+      log_warning "Tars have not been installed, as ${C_RESET}${DEPENDENCY_SUBDIR}${C_WARNING} already exists."
1525 1532
    fi
1526 1533
 
1527 1534
    build_clones "$@"
... ...
@@ -1530,7 +1537,7 @@ main()
1530 1537
    then
1531 1538
       if [ "${clean}" = "YES" -a -d "${DEPENDENCY_SUBDIR}" ]
1532 1539
       then
1533
-         log_info "Write-protecting ${C_WHITE}${DEPENDENCY_SUBDIR}${C_INFO} to avoid spurious header edits"
1540
+         log_info "Write-protecting ${C_RESET}${DEPENDENCY_SUBDIR}${C_INFO} to avoid spurious header edits"
1534 1541
          exekutor chmod -R a-w "${DEPENDENCY_SUBDIR}"
1535 1542
       fi
1536 1543
    fi
1537 1544
old mode 100644
1538 1545
new mode 100755
... ...
@@ -82,7 +82,7 @@ check_and_usage_and_help()
82 82
 
83 83
 
84 84
 COMMAND=${1:-"build"}
85
-shift
85
+[ $# -eq 0 ] || shift
86 86
 
87 87
 check_and_usage_and_help
88 88
 
... ...
@@ -81,7 +81,7 @@ else
81 81
    if [ -z "${COMMAND}" ]
82 82
    then
83 83
       COMMAND=${1:-"install"}
84
-      shift
84
+      [ $# -eq 0 ] || shift
85 85
    fi
86 86
 
87 87
    if [ "${MULLE_BOOTSTRAP}" = "mulle-bootstrap" ]
... ...
@@ -396,7 +396,7 @@ git_pull()
396 396
 
397 397
    [ -z "$dst" ] && internal_fail "dst is empty"
398 398
 
399
-   log_info "Updating ${C_WHITE}${dst}${C_INFO} ..."
399
+   log_info "Updating ${C_RESET}${dst}${C_INFO} ..."
400 400
    ( exekutor cd "${dst}" ; exekutor git pull ${GITFLAGS} ) || fail "git pull of \"${dst}\" failed"
401 401
 
402 402
    if [ "${tag}" != "" ]
... ...
@@ -493,7 +493,7 @@ bootstrap_auto_update()
493 493
 
494 494
       mkdir_if_missing "${BOOTSTRAP_SUBDIR}.auto/settings/${name}"
495 495
       relative="`compute_relative "${BOOTSTRAP_SUBDIR}"`"
496
-      exekutor find "${dst}/.bootstrap/settings" -type f -depth 1 -print0 | \
496
+      exekutor find "${dst}/.bootstrap/settings" -type f -mindepth 1 -maxdepth 1 -print0 | \
497 497
          exekutor xargs -0 -I % ln -s -f "${relative}/../../"% "${BOOTSTRAP_SUBDIR}.auto/settings/${name}"
498 498
 
499 499
       if [ -e "${dst}/.bootstrap/settings/bin"  ]
... ...
@@ -503,7 +503,7 @@ bootstrap_auto_update()
503 503
 
504 504
       # flatten other folders into our own settings
505 505
       # don't force though, keep first
506
-      exekutor find "${dst}/.bootstrap/settings" ! -name bin -type d -depth 1 -print0 | \
506
+      exekutor find "${dst}/.bootstrap/settings" ! -name bin -type d -mindepth 1 -maxdepth 1 -print0 | \
507 507
          exekutor xargs -0 -I % ln -s "${relative}/../"% "${BOOTSTRAP_SUBDIR}.auto/settings"
508 508
    fi
509 509
 
... ...
@@ -524,7 +524,7 @@ ensure_clones_directory()
524 524
 
525 525
    if [ -d "${BOOTSTRAP_SUBDIR}.auto" ]
526 526
    then
527
-      log_warning "Folder ${C_WHITE}${BOOTSTRAP_SUBDIR}.auto${C_WARNING} already exists!"
527
+      log_warning "Folder ${C_RESET}${BOOTSTRAP_SUBDIR}.auto${C_WARNING} already exists!"
528 528
    fi
529 529
 }
530 530
 
... ...
@@ -623,7 +623,7 @@ checkout()
623 623
    then
624 624
       log_error "Stale folders ${DEPENDENCY_SUBDIR} and/or ${CLONESBUILD_SUBDIR} found."
625 625
       log_error "Please remove them before continuing."
626
-      log_info  "Suggested command: ${C_WHITE}mulle-bootstrap clean output"
626
+      log_info  "Suggested command: ${C_RESET}mulle-bootstrap clean output"
627 627
       exit 1
628 628
    fi
629 629
 
630 630
old mode 100644
631 631
new mode 100755
... ...
@@ -89,7 +89,7 @@ log_trace()
89 89
 }
90 90
 
91 91
 
92
-C_TRACE2="${C_WHITE}"
92
+C_TRACE2="${C_RESET}"
93 93
 log_trace2()
94 94
 {
95 95
    echo "${C_TRACE2}$*${C_RESET}" >&2
... ...
@@ -333,7 +333,7 @@ mkdir_if_missing()
333 333
 {
334 334
    if [ ! -d "${1}" ]
335 335
    then
336
-      log_fluff "Creating ${C_WHITE}$1${C_FLUFF} (`pwd -P`)"
336
+      log_fluff "Creating ${C_RESET}$1${C_FLUFF} (`pwd -P`)"
337 337
       exekutor mkdir -p "$1" || fail "failed to create directory \"$1\""
338 338
    fi
339 339
 }
... ...
@@ -348,7 +348,7 @@ assert_sane_subdir_path()
348 348
 {
349 349
    case "$1"  in
350 350
       \$*|~/.|..|./|../|/*)
351
-         log_error "refuse unsafe path ${C_WHITE}$1"
351
+         log_error "refuse unsafe path ${C_RESET}$1"
352 352
          exit 1
353 353
       ;;
354 354
    esac
... ...
@@ -359,7 +359,7 @@ assert_sane_path()
359 359
 {
360 360
    case "$1"  in
361 361
       \$*|~/*|..|.|/|./|../*)
362
-         log_error "refuse unsafe path ${C_WHITE}$1"
362
+         log_error "refuse unsafe path ${C_RESET}$1"
363 363
          exit 1
364 364
       ;;
365 365
    esac
... ...
@@ -384,7 +384,7 @@ user_say_yes()
384 384
   x=`read_config_setting "answer" "ASK"`
385 385
   while [ "$x" != "Y" -a "$x" != "YES" -a  "$x" != "N"  -a  "$x" != "NO"  -a "$x" != "" ]
386 386
   do
387
-     echo "${C_YELLOW}$* (${C_WHITE}y${C_YELLOW}/${C_GREEN}N${C_YELLOW})${C_RESET}" >&2
387
+     echo "${C_YELLOW}$* (${C_RESET}y${C_YELLOW}/${C_GREEN}N${C_YELLOW})${C_RESET}" >&2
388 388
      read x
389 389
      x=`echo "${x}" | tr '[:lower:]' '[:upper:]'`
390 390
   done
... ...
@@ -500,7 +500,7 @@ run_script()
500 500
 
501 501
    if [ -x "${script}" ]
502 502
    then
503
-      log_info "Executing script ${C_WHITE}${script}${C_INFO}"
503
+      log_info "Executing script ${C_RESET}${script}${C_INFO}"
504 504
       exekutor "${script}" "$@" || fail "script \"${script}\" did not run successfully"
505 505
    else
506 506
       if [ ! -e "${script}" ]
507 507
old mode 100644
508 508
new mode 100755
509 509
old mode 100644
510 510
new mode 100755
511 511
old mode 100644
512 512
new mode 100755
513 513
old mode 100644
514 514
new mode 100755
... ...
@@ -109,13 +109,13 @@ _read_setting()
109 109
       value="${file}"
110 110
       if [ "$MULLE_BOOTSTRAP_VERBOSE" = "YES"  ]
111 111
       then
112
-         log_fluff "${C_MAGENTA}`basename "${file}"`${C_FLUFF} found as ${C_WHITE}\"${file}\"${C_FLUFF}${C_FLUFF}"
112
+         log_fluff "${C_MAGENTA}`basename "${file}"`${C_FLUFF} found as ${C_RESET}${file}${C_FLUFF}${C_FLUFF}"
113 113
       fi
114 114
    else
115 115
       value=`egrep -v '^#|^[ ]*$' "${file}"`
116 116
       if [ "$MULLE_BOOTSTRAP_VERBOSE" = "YES"  ]
117 117
       then
118
-         log_fluff "Setting ${C_MAGENTA}`basename "${file}"`${C_FLUFF} found in ${C_WHITE}\"${file}\"${C_FLUFF} as ${C_MAGENTA}\"${value}\"${C_FLUFF}"
118
+         log_fluff "Setting ${C_MAGENTA}`basename "${file}"`${C_FLUFF} found in ${C_RESET}${file}${C_FLUFF} as ${C_MAGENTA}\"${value}\"${C_FLUFF}"
119 119
       fi
120 120
    fi
121 121
 
... ...
@@ -85,13 +85,13 @@ fi
85 85
 
86 86
 
87 87
 TAG=${1:-"$AGVTAG"}
88
-shift
88
+[ $# -eq 0 ] || shift
89 89
 
90 90
 VENDOR_TAG="$1"
91
-shift
91
+[ $# -eq 0 ] || shift
92 92
 
93 93
 VENDOR_PREFIX="$1"
94
-shift
94
+[ $# -eq 0 ] || shift
95 95
 
96 96
 
97 97
 if [ -z "${VENDOR_TAG}" -o "${VENDOR_TAG}" = "-" ]
98 98
old mode 100644
99 99
new mode 100755
... ...
@@ -92,7 +92,7 @@ Abort now ?"
92 92
          then
93 93
              log_error "The bootstrap is in an inconsistent state. It would be good
94 94
 to run
95
-           ${C_WHITE}mulle-bootstrap clean dist${C_ERROR}
95
+           ${C_RESET}mulle-bootstrap clean dist${C_ERROR}
96 96
 now."
97 97
              return 1
98 98
          fi
... ...
@@ -35,6 +35,10 @@
35 35
 . mulle-bootstrap-local-environment.sh
36 36
 . mulle-bootstrap-brew.sh
37 37
 
38
+if [ "`uname`" != 'Darwin' ]
39
+then
40
+   fail "for now xcode only works on OS X"
41
+fi
38 42
 
39 43
 usage()
40 44
 {
... ...
@@ -63,9 +67,9 @@ esac
63 67
 
64 68
 
65 69
 COMMAND="${1:-add}"
66
-shift
70
+[ $# -eq 0 ] || shift
67 71
 PROJECT="$1"
68
-shift
72
+[ $# -eq 0 ] || shift
69 73
 
70 74
 
71 75
 check_and_usage_and_help
... ...
@@ -253,7 +257,7 @@ Release"
253 257
       if [ $terse -ne 0 ]
254 258
       then
255 259
          #     012345678901234567890123456789012345678901234567890123456789
256
-         echo "${C_WHITE}Settings will be added to ${C_MAGENTA}${projectname}${C_WHITE}." >&2
260
+         echo "${C_RESET}Settings will be added to ${C_MAGENTA}${projectname}${C_RESET}." >&2
257 261
          echo "In the long term it may be more useful to copy/paste the following" >&2
258 262
          echo "lines into a local .xcconfig file, that is inherited by all configurations.${C_RESET}" >&2
259 263
       fi
... ...
@@ -263,7 +267,7 @@ Release"
263 267
       if [ $terse -ne 0 ]
264 268
       then
265 269
          #     012345678901234567890123456789012345678901234567890123456789
266
-         echo "${C_WHITE}Settings will be removed from ${projectname}." >&2
270
+         echo "${C_RESET}Settings will be removed from ${projectname}." >&2
267 271
          echo "You may want to check afterwards, that this has worked out OK :).${C_RESET}" >&2
268 272
       fi
269 273
    fi
... ...
@@ -314,7 +318,7 @@ Release"
314 318
          local mapped
315 319
          local i
316 320
 
317
-         echo  "${C_WHITE}-----------------------------------------------------------"  >&2
321
+         echo  "${C_RESET}-----------------------------------------------------------"  >&2
318 322
 
319 323
          #  make these echos easily grabable by stdout
320 324
          #     012345678901234567890123456789012345678901234567890123456789
... ...
@@ -345,9 +349,9 @@ Release"
345 349
          echo  "-----------------------------------------------------------${C_RESET}"  >&2
346 350
       fi
347 351
 
348
-      query="Add ${C_CYAN}\"${DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}\"${C_YELLOW}  and friends to search paths of ${C_MAGENTA}${projectname}${C_YELLOW} ?"
352
+      query="Add ${C_CYAN}${DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}${C_YELLOW} and friends to search paths of ${C_MAGENTA}${projectname}${C_YELLOW} ?"
349 353
    else
350
-      query="Remove ${C_CYAN}\"${DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}\"${C_YELLOW}  and friends from search paths of ${C_MAGENTA}${projectname}${C_YELLOW} ?"
354
+      query="Remove ${C_CYAN}${DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}${C_YELLOW} and friends from search paths of ${C_MAGENTA}${projectname}${C_YELLOW} ?"
351 355
    fi
352 356
 
353 357
    user_say_yes "$query"
... ...
@@ -367,7 +371,7 @@ Release"
367 371
       if [ $terse -ne 0 ]
368 372
       then
369 373
          #     012345678901234567890123456789012345678901234567890123456789
370
-         echo "${C_WHITE}"
374
+         echo "${C_RESET}"
371 375
          echo "Hint:"
372 376
          echo "If you add a configuration to your project, remember to edit" >&2
373 377
          echo "the LIBRARY_CONFIGURATION setting for that configuration." >&2
... ...
@@ -14,13 +14,13 @@ git_must_be_clean()
14 14
 
15 15
    if [ ! -d .git ]
16 16
    then
17
-      fail "${C_WHITE}${name}${C_ERROR} is not a git repository"
17
+      fail "${C_RESET}${name}${C_ERROR} is not a git repository"
18 18
    fi
19 19
 
20 20
    clean=`git status -s`
21 21
    if [ "${clean}" != "" ]
22 22
    then
23
-      fail "repository ${C_WHITE}${name}${C_ERROR} is tainted"
23
+      fail "repository ${C_RESET}${name}${C_ERROR} is tainted"
24 24
    fi
25 25
 }
26 26