Browse code

simplify settings again improve exekutor trace

Nat! authored on 06-09-2016 14:30:53
Showing 6 changed files
... ...
@@ -59,8 +59,8 @@ These settings are usually repository specific, but can be set globally also.
59 59
 
60 60
 #### Search Paths
61 61
 
62
-1. `.bootstrap.local/${reponame}/settings`
63
-2. `.bootstrap/${reponame}/settings`        (Inheritable)
62
+1. `.bootstrap.local/${reponame}`
63
+2. `.bootstrap/${reponame}`          (Inheritable)
64 64
 
65 65
 4. `.bootstrap.local/settings`
66 66
 5. `.bootstrap/settings`
... ...
@@ -103,17 +103,20 @@ Setting Name                     |  Description                               |
103 103
 Repository Specific Settings
104 104
 ===================
105 105
 
106
+Some settings are not supplied by root build settings.
107
+
106 108
 #### Search Paths
107 109
 
108
-1. `.bootstrap.local/${reponame}/settings`
109
-2. `.bootstrap/${reponame}/settings`          (Inheritable)
110
+1. `.bootstrap.local/${reponame}`
111
+2. `.bootstrap/${reponame}`       (Inheritable)
110 112
 
111 113
 
112 114
 #### Settings
113 115
 
114 116
 Setting Name     | Used by       | Description
115 117
 -----------------|---------------|---------------------------
116
-`tag`            | fetch         | What to checkout after fetching a repository.
118
+`tag`            | fetch         | What to checkout after fetching a
119
+                 |               | repository. (Preferably don't use)
117 120
 `xcode_project`  | build,xcode   | The Xcode project file to use
118 121
 `xcode_schemes`  | build         | The Xcode schemes to build
119 122
 `xcode_targets`  | build         | The Xcode targets to build
... ...
@@ -125,8 +128,8 @@ Scripts
125 128
 Scripts are run at various times during the fetch, build and tag process.
126 129
 Root scripts must be aware, that they will be called for every repository.
127 130
 
128
-1. `.bootstrap.local/${reponame}/settings/bin`
129
-2. `.bootstrap/${reponame}/settings/bin`     (Inheritable)
131
+1. `.bootstrap.local/${reponame}/bin`
132
+2. `.bootstrap/${reponame}/bin`   (Inheritable)
130 133
 
131 134
 1. `.bootstrap.local/settings/bin`
132 135
 2. `.bootstrap/settings/bin`
... ...
@@ -184,7 +187,8 @@ Setting Name                      |  Description
184 187
 ----------------------------------|-----------------------------------------------|--------------
185 188
 `build_preferences`               | list order of preferred build tools. Will be  |
186 189
                                   | used in deciding if to use cmake or           |
187
-                                  | xcodebuild, if both are available             | script\nxcodebuild\ncmake\nconfigure
190
+                                  | xcodebuild, if both are available             |
191
+                                  | script\nxcodebuild\ncmake\nconfigure          |
188 192
 `build_foldername`                | OBJROOT, build root for intermediate files    |
189 193
                                   | like .o                                       | `build/.repos`
190 194
 `build_log_foldername`            | name of the output folder for logs            | `build/.repos/.logs
... ...
@@ -205,16 +209,16 @@ Setting Name                      |  Description
205 209
 
206 210
 ##### Init Config Settings
207 211
 
208
-Setting Name                    |  Description                                  | Default
209
-`create_default_files`          | if mulle-bootstrap init should populate       |
210
-                                | .bootstrap with some default files            | YES
211
-`create_example_files`          | if mulle-bootstrap init should populate       |
212
-                                | .bootstrap with some example files            | YES
213
-`editor`                        | the editor mulle-bootstrap init should use    |
214
-                                | to edit repositories                          | EDITOR environment variable
215
-`open_repositories_file`        | if mulle-bootstrap init should open an editor |
216
-                                | to edit repositories (YES/NO/ASK)             | ASK
212
+Setting Name                      |  Description                                  | Default
213
+----------------------------------|-----------------------------------------------|--------------
214
+`create_default_files`            | if mulle-bootstrap init should populate       |
215
+                                  | .bootstrap with some default files            | YES
216
+`create_example_files`            | if mulle-bootstrap init should populate       |
217
+                                  | .bootstrap with some example files            | YES
218
+`editor`                          | the editor mulle-bootstrap init should use    |
219
+                                  | to edit repositories                          | EDITOR environment variable
220
+`open_repositories_file`          | if mulle-bootstrap init should open an editor |
221
+                                  | to edit repositories (YES/NO/ASK)             | ASK
217 222
 
218 223
 
219 224
 ##### Clean Config Settings
... ...
@@ -73,9 +73,9 @@ embedded_repositories()
73 73
    local dir
74 74
    local name
75 75
 
76
-   [ -z "${MULLE_BOOTSTRAP_REFRESH_SH}" ] && . mulle-bootstrap-refresh.sh 
76
+   [ -z "${MULLE_BOOTSTRAP_REFRESH_SH}" ] && . mulle-bootstrap-refresh.sh
77 77
 
78
-   refresh_main 
78
+   refresh_main
79 79
 
80 80
    clones="`read_fetch_setting "embedded_repositories"`"
81 81
    if [ "${clones}" != "" ]
... ...
@@ -233,8 +233,8 @@ ${DEPENDENCY_SUBDIR}/tmp"`"
233 233
    case "${COMMAND}" in
234 234
       dist)
235 235
          DIST_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "dist_clean_folders" "${CLONES_SUBDIR}
236
-${ADDICTION_SUBDIR}"
237
-.bootstrap.auto`"         
236
+${ADDICTION_SUBDIR}
237
+.bootstrap.auto"`"
238 238
          EMBEDDED="`embedded_repositories`"
239 239
 
240 240
          if [ ! -z "$EMBEDDED" ]
... ...
@@ -282,7 +282,7 @@ clean_main()
282 282
 
283 283
       *)
284 284
          log_error "Unknown command \${COMMAND}\""
285
-         clean_usage 
285
+         clean_usage
286 286
       ;;
287 287
    esac
288 288
 }
... ...
@@ -1337,6 +1337,7 @@ fetch_main()
1337 1337
    esac
1338 1338
 
1339 1339
    [ -z "${MULLE_BOOTSTRAP_LOCAL_ENVIRONMENT_SH}" ] && . mulle-bootstrap-local-environment.sh
1340
+   [ -z "${MULLE_BOOTSTRAP_SETTINGS_SH}" ] && . mulle-bootstrap-settings.sh
1340 1341
 
1341 1342
    case "${UNAME}" in
1342 1343
       mingw)
... ...
@@ -1388,8 +1389,16 @@ fetch_main()
1388 1389
 
1389 1390
       check_tars
1390 1391
    else
1391
-      update_repositories "$@"
1392
-      update_embedded_repositories
1392
+      if dir_has_files "${CLONESFETCH_SUBDIR}"
1393
+      then
1394
+         update_repositories "$@"
1395
+         update_embedded_repositories
1396
+      else
1397
+         log_info "Nothing to update, fetch first"
1398
+
1399
+         log_fluff "::: fetch end :::"
1400
+         return 0
1401
+      fi
1393 1402
    fi
1394 1403
 
1395 1404
    #
... ...
@@ -54,7 +54,7 @@ eval_exekutor()
54 54
 
55 55
 logging_eval_exekutor()
56 56
 {
57
-   echo "==>" "$@" >&2
57
+   echo "==>" "$@" # to stdout
58 58
    eval_exekutor "$@"
59 59
 }
60 60
 
... ...
@@ -75,12 +75,8 @@ exekutor()
75 75
 
76 76
 logging_exekutor()
77 77
 {
78
-   echo "==>" "$@" >&2
79
-
80
-   if [ "${MULLE_BOOTSTRAP_DRY_RUN}" != "YES" ]
81
-   then
82
-      "$@"
83
-   fi
78
+   echo "==>" "$@" # to stdout
79
+   exekutor "$@"
84 80
 }
85 81
 
86 82
 
... ...
@@ -673,8 +669,6 @@ lso()
673 669
 }
674 670
 
675 671
 
676
-
677
-
678 672
 #
679 673
 # this does not check for hidden files, ignores directories
680 674
 # optionally give filetype f or d as second agument
... ...
@@ -102,8 +102,8 @@ ${clone}"
102 102
                dstdir="${CLONESFETCH_SUBDIR}/${name}"
103 103
 
104 104
                #
105
-               # dependency management, it could be nicer, but isn't
106
-               # currently match only URLs
105
+               # dependency management, it could be nicer, but isn't.
106
+               # Currently matches only URLs
107 107
                #
108 108
                local sub_repos
109 109
                local filename
... ...
@@ -557,8 +557,8 @@ refresh_main()
557 557
 
558 558
    [ -z "${MULLE_BOOTSTRAP_LOCAL_ENVIRONMENT_SH}" ] && . mulle-bootstrap-local-environment.sh
559 559
    [ -z "${MULLE_BOOTSTRAP_SETTINGS_SH}" ] && . mulle-bootstrap-settings.sh
560
-   [ -z "${MULLE_BOOTSTRAP_AUTO_UPDATE_SH}" ] && . mulle-bootstrap-auto-update.sh 
561
-   [ -z "${MULLE_BOOTSTRAP_DEPENDENCY_RESOLVE_SH}" ] && . mulle-bootstrap-dependency-resolve.sh 
560
+   [ -z "${MULLE_BOOTSTRAP_AUTO_UPDATE_SH}" ] && . mulle-bootstrap-auto-update.sh
561
+   [ -z "${MULLE_BOOTSTRAP_DEPENDENCY_RESOLVE_SH}" ] && . mulle-bootstrap-dependency-resolve.sh
562 562
 
563 563
    while :
564 564
    do
... ...
@@ -323,12 +323,12 @@ read_repo_setting()
323 323
 
324 324
    if [ "${READ_SETTING_RETURNS_PATH}" != "YES" ]
325 325
    then
326
-      value="`_read_bootstrap_setting "settings/${package}/${name}.${UNAME}"`"
326
+      value="`_read_bootstrap_setting "${package}/${name}.${UNAME}"`"
327 327
    fi
328 328
 
329 329
    if [ $? -ne 0 ]
330 330
    then
331
-      value="`_read_bootstrap_setting "settings/${package}/${name}"`"
331
+      value="`_read_bootstrap_setting "${package}/${name}"`"
332 332
       if [ $? -ne 0 ]
333 333
       then
334 334
          value="${default}"
... ...
@@ -421,7 +421,7 @@ read_build_setting()
421 421
    rval=1
422 422
    if [ "${READ_SETTING_RETURNS_PATH}" != "YES" ]
423 423
    then
424
-      value="`_read_bootstrap_setting "settings/${package}/${name}.${UNAME}"`"
424
+      value="`_read_bootstrap_setting "${package}/${name}.${UNAME}"`"
425 425
       if [ $? -ne 0 ]
426 426
       then
427 427
          value="`_read_bootstrap_setting "settings/${name}.${UNAME}"`"
... ...
@@ -431,7 +431,7 @@ read_build_setting()
431 431
 
432 432
    if [ $rval -ne 0 ]
433 433
    then
434
-      value="`_read_bootstrap_setting "settings/${package}/${name}"`"
434
+      value="`_read_bootstrap_setting "${package}/${name}"`"
435 435
       if [ $? -ne 0 ]
436 436
       then
437 437
          value="`_read_bootstrap_setting "settings/${name}"`"