Browse code

Added `additional_repositories` for MulleEOF. Now it is possible to list settings.

Nat! authored on 18-04-2017 17:44:27
Showing 10 changed files
... ...
@@ -1,3 +1,11 @@
1
+### 3.4.0
2
+
3
+* added handling of `additional_repositories`. This is supposed to be used
4
+in `.bootstrap.local`. This way I can specify a "MulleFoundation" dependency
5
+if I want to compile for mulle-objc. But sometimes I want the Apple Foundation.
6
+* finally added list command for `setting`. All that's needed now is a scripts
7
+setting to list all scripts
8
+
1 9
 ### 3.3.0
2 10
 
3 11
 * `mulle-bootstrap project-path` prints out what it thinks your project path is.
... ...
@@ -17,6 +25,7 @@ it easier to copy/paste show output.
17 25
 * With config `use_cc_cxx=NO` mulle-bootstrap won't read the compiler to use
18 26
 from `.CC` and `.CXX`.
19 27
 
28
+
20 29
 ### 3.2.0
21 30
 
22 31
 Do not specify cmake dependency in homebrew formula for mulle-bootstrap, since
... ...
@@ -3,7 +3,7 @@
3 3
 > <font color="green">**Important: Setting values are delimited by LF.**</font>
4 4
 
5 5
 1. All files in lowercase are regular settings
6
-2. All files in uppercase are expansion settings (somewhar like an environment variable).These are not described here.
6
+2. All files in uppercase are expansion settings (somewhat like an environment variable).These are not described here.
7 7
 3 Config settings are local to the system. They are not part of a
8 8
 distribution.
9 9
 
... ...
@@ -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
 MULLE_EXECUTABLE_VERSION_MAJOR=3
32
-MULLE_EXECUTABLE_VERSION_MINOR=3
32
+MULLE_EXECUTABLE_VERSION_MINOR=4
33 33
 MULLE_EXECUTABLE_VERSION_PATCH=0
34 34
 
35 35
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
... ...
@@ -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
 MULLE_EXECUTABLE_VERSION_MAJOR=3
32
-MULLE_EXECUTABLE_VERSION_MINOR=3
32
+MULLE_EXECUTABLE_VERSION_MINOR=4
33 33
 MULLE_EXECUTABLE_VERSION_PATCH=0
34 34
 
35 35
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
... ...
@@ -114,6 +114,14 @@ _bootstrap_auto_copy()
114 114
             seen="`seen_check "${seen}" "${name}"`"
115 115
          ;;
116 116
 
117
+         additional_repositories)
118
+            if [ "${is_local}" = "YES" ]
119
+            then
120
+               merge_repository_files "${filepath}" "${dstfilepath}" "NO"
121
+               seen="`seen_check "${seen}" "${name}"`"
122
+            fi
123
+         ;;
124
+
117 125
          embedded_repositories)
118 126
             (
119 127
                STASHES_DEFAULT_DIR=""
... ...
@@ -303,13 +311,18 @@ _bootstrap_auto_merge_root_settings()
303 311
 
304 312
       #
305 313
       # "repositories" files gets special treatment
314
+      # "additional_repositories" is just a local patch thing
306 315
       # "embedded_repositories" is not merged though
307 316
       case "${settingname}" in
308 317
          "embedded_repositories"|"minions")
309 318
             continue  # done by caller
310 319
          ;;
311 320
 
312
-         "repositories")
321
+         "additional_repositories")
322
+            continue # just ignored
323
+         ;;
324
+
325
+         "repositories"|"additional_repositories")
313 326
             merge_repository_files "${srcfile}" "${dstfile}" "YES"
314 327
             continue
315 328
          ;;
... ...
@@ -404,7 +417,7 @@ bootstrap_auto_update()
404 417
          _bootstrap_auto_embedded_copy "${name}" "${stashdir}" "${src}"
405 418
       fi
406 419
 
407
-      # don't copy minions
420
+      # don't copy minions or additional_repositories
408 421
 
409 422
       src="${stashdir}/${BOOTSTRAP_DIR}/bin"
410 423
       if [ -d "${src}" ]
... ...
@@ -783,6 +783,12 @@ _update_operation_walk_repositories()
783 783
                           "${operation}" \
784 784
                           "${permissions}" \
785 785
                           "${REPOS_DIR}"
786
+
787
+   permissions="minion"
788
+   walk_auto_repositories "additional_repositories"  \
789
+                          "${operation}" \
790
+                          "${permissions}" \
791
+                          "${REPOS_DIR}"
786 792
 }
787 793
 
788 794
 
... ...
@@ -1464,12 +1470,15 @@ fetch_loop_repositories()
1464 1470
    local loops
1465 1471
    local before
1466 1472
    local after
1473
+   local auxbefore
1474
+   local auxafter
1467 1475
    local required
1468 1476
 
1469 1477
    log_debug "fetch_loop_repositories"
1470 1478
 
1471 1479
    loops=""
1472 1480
    before=""
1481
+   auxbefore=""
1473 1482
 
1474 1483
    __IGNORE__=""
1475 1484
 
... ...
@@ -1484,9 +1493,12 @@ fetch_loop_repositories()
1484 1493
 
1485 1494
       after="${before}"
1486 1495
       before="`read_root_setting "repositories" | sort`"
1487
-      if [ "${after}" = "${before}" ]
1496
+      auxafter="${auxbefore}"
1497
+      auxbefore="`read_root_setting "additional_repositories" | sort`"
1498
+
1499
+      if [ "${after}" = "${before}" -a "${auxafter}" = "${auxbefore}" ]
1488 1500
       then
1489
-         log_fluff "Repositories file is unchanged, so done"
1501
+         log_fluff "Repositories files are unchanged, so done"
1490 1502
          break
1491 1503
       fi
1492 1504
 
... ...
@@ -1499,6 +1511,7 @@ fetch_loop_repositories()
1499 1511
 
1500 1512
       required="`read_root_setting "required"`"
1501 1513
       work_clones "${REPOS_DIR}" "${before}" "${required}" "YES"
1514
+      work_clones "${REPOS_DIR}" "${auxbefore}" "${required}" "YES"
1502 1515
 
1503 1516
       __IGNORE__="`add_line "${__IGNORE__}" "${__REFRESHED__}"`"
1504 1517
 
... ...
@@ -285,12 +285,20 @@ escape_linefeeds()
285 285
 }
286 286
 
287 287
 
288
+_unescape_linefeeds()
289
+{
290
+   tr '|' '\012' | sed -e 's/\\$/|/g' -e '/^$/d'
291
+}
292
+
293
+
288 294
 unescape_linefeeds()
289 295
 {
290 296
    echo "$@" | tr '|' '\012' | sed -e 's/\\$/|/g' -e '/^$/d'
291 297
 }
292 298
 
293 299
 
300
+
301
+
294 302
 #
295 303
 # expands ${LOGNAME} and ${LOGNAME:-foo}
296 304
 #
... ...
@@ -1157,12 +1157,8 @@ unique_repository_contents()
1157 1157
 #
1158 1158
 sort_repository_file()
1159 1159
 {
1160
-   local clones
1161 1160
    local stop
1162
-   local refreshed
1163 1161
    local match
1164
-   local dependency_map
1165
-   local clone
1166 1162
 
1167 1163
    [ -z "${MULLE_BOOTSTRAP_DEPENDENCY_RESOLVE_SH}" ] && . mulle-bootstrap-dependency-resolve.sh
1168 1164
 
... ...
@@ -1170,21 +1166,37 @@ sort_repository_file()
1170 1166
 
1171 1167
    log_debug ":sort_repository_file:"
1172 1168
 
1173
-   refreshed=""
1174
-   dependency_map=""
1175 1169
 
1176 1170
    #
1177 1171
    # read from .auto
1178 1172
    #
1173
+   local clones
1174
+   local auxclones
1175
+
1176
+
1179 1177
    clones="`read_root_setting "repositories"`"
1180
-   if [ -z "${clones}" ]
1178
+   auxclones="`read_root_setting "additional_repositories"`"
1179
+
1180
+   if [ -z "${clones}" -a -z "${auxclones}" ]
1181 1181
    then
1182 1182
       return
1183 1183
    fi
1184 1184
 
1185
+   local refreshed
1186
+   local dependency_map
1187
+   local clone
1188
+
1189
+   refreshed=""
1190
+   dependency_map=""
1191
+
1192
+   #
1193
+   # add auxclones first, they and there dependencies will be sorted
1194
+   # first, which is useful, because we often don't know who'se
1195
+   # depending on them in a master situation.
1196
+   #
1185 1197
    IFS="
1186 1198
 "
1187
-   for clone in ${clones}
1199
+   for clone in ${auxclones} ${clones}
1188 1200
    do
1189 1201
       IFS="${DEFAULT_IFS}"
1190 1202
 
... ...
@@ -77,11 +77,13 @@ usage:
77 77
    mulle-bootstrap setting [options] [key][=][value]
78 78
 
79 79
    Options:
80
-      -a   : append value to setting
81
-      -d   : delete setting
82
-      -g   : use global .bootstrap folder instead of local
83
-      -p   : show current setting value
84
-      -r   : specify repository for build setting
80
+      -a              : append value to setting
81
+      -b <repository> : specify repository for build setting
82
+      -d              : delete setting
83
+      -g              : use global .bootstrap folder instead of local
84
+      -o              : use overrides settings
85
+      -p              : show current setting value
86
+      -r              : use root settings
85 87
 
86 88
    Use:
87 89
       mulle-bootstrap setting <key> to read settings
... ...
@@ -144,6 +146,7 @@ xcodebuild
144 146
 "
145 147
 
146 148
 KNOWN_ROOT_SETTING_KEYS="\
149
+additional_repositories
147 150
 brews
148 151
 embedded_repositories
149 152
 repositories
... ...
@@ -463,6 +466,29 @@ _read_home_setting()
463 466
 }
464 467
 
465 468
 
469
+
470
+list_build_directories()
471
+{
472
+   local directory="$1"
473
+
474
+   local filename
475
+   local name
476
+
477
+   IFS="
478
+"
479
+   for filename in `ls -1 "${directory}/*.build" 2> /dev/null`
480
+   do
481
+      IFS="${DEFAULT_IFS}"
482
+
483
+      name="`basename -- "${filename}" ".build"`"
484
+      echo "# mulle-bootstrap setting -r '${name}' -l"
485
+   done
486
+
487
+   IFS="${DEFAULT_IFS}"
488
+}
489
+
490
+
491
+
466 492
 list_dir_settings()
467 493
 {
468 494
    local directory="$1"
... ...
@@ -482,6 +508,7 @@ list_dir_settings()
482 508
       value="`_read_setting "${directory}/${key}"`"
483 509
       if [ ! -z "${value}" ]
484 510
       then
511
+         value="`escape_linefeeds "${value}"`"
485 512
          echo "${key} '${value}'"
486 513
       fi
487 514
    done
... ...
@@ -492,6 +519,7 @@ list_dir_settings()
492 519
 
493 520
 CONFIG_KEY_REGEXP='^[a-z_][a-z_0-9]*$'
494 521
 
522
+
495 523
 list_local_config_settings()
496 524
 {
497 525
    list_dir_settings "${BOOTSTRAP_DIR}.local/config" "${CONFIG_KEY_REGEXP}"
... ...
@@ -882,17 +910,10 @@ ${keys3}
882 910
 #
883 911
 # setting ops
884 912
 #
885
-_setting_list()
886
-{
887
-   fail "Not yet implemented"
888
-}
889
-
890 913
 
891 914
 _chosen_bootstrapdir()
892 915
 {
893
-   local option="$1"
894
-
895
-   if [ "${option}" = "YES" ]
916
+   if [ "${OPTION_GLOBAL}" = "YES" ]
896 917
    then
897 918
       echo "${BOOTSTRAP_DIR}"
898 919
    else
... ...
@@ -904,31 +925,142 @@ _chosen_bootstrapdir()
904 925
 _chosen_setting_directory()
905 926
 {
906 927
    local repository="$1"
907
-   local option="$2"
908 928
 
909 929
    local bootstrapdir
910 930
 
911
-   if [ "${option}" = "YES" ]
931
+   if [ "${OPTION_GLOBAL}" = "YES" ]
912 932
    then
913 933
       bootstrapdir="${BOOTSTRAP_DIR}"
914
-      if [ ! -z "${repository}" ]
915
-      then
916
-         echo "${bootstrapdir}/${repository}.build"
917
-      else
918
-         echo "${bootstrapdir}"
919
-      fi
920 934
    else
921 935
       bootstrapdir="${BOOTSTRAP_DIR}.local"
922
-      if [ ! -z "${3}" ]
923
-      then
924
-         echo "${bootstrapdir}/${repository}.build"
925
-      else
926
-         echo "${bootstrapdir}/settings/"
927
-      fi
928 936
    fi
937
+
938
+   if [ ! -z "${repository}" ]
939
+   then
940
+      echo "${bootstrapdir}/${repository}.build"
941
+      return
942
+   fi
943
+
944
+   if [ "${OPTION_ROOT}" = "YES" ]
945
+   then
946
+      echo "${bootstrapdir}"
947
+      return
948
+   fi
949
+
950
+   if [ "${OPTION_OVERRIDES}" = "YES" ]
951
+   then
952
+      echo "${bootstrapdir}/overrides"
953
+      return
954
+   fi
955
+
956
+   echo "${bootstrapdir}/settings"
957
+}
958
+
959
+
960
+SETTING_KEY_REGEXP='^[a-z_][a-z_0-9]*$'
961
+
962
+
963
+list_local_settings()
964
+{
965
+   list_dir_settings "${BOOTSTRAP_DIR}.local" "${SETTING_KEY_REGEXP}"
966
+}
967
+
968
+
969
+list_global_settings()
970
+{
971
+   list_dir_settings "${BOOTSTRAP_DIR}" "${SETTING_KEY_REGEXP}"
972
+}
973
+
974
+
975
+_setting_list()
976
+{
977
+   local repository="$1"
978
+
979
+   if [ -z "${repository}" ]
980
+   then
981
+      log_info ".bootstrap.local ($PWD):"
982
+
983
+      list_dir_settings "${BOOTSTRAP_DIR}.local" "${SETTING_KEY_REGEXP}" | \
984
+                        sed "s/^/mulle-bootstrap setting -r /" | \
985
+                        _unescape_linefeeds
986
+
987
+      log_info ".bootstrap ($PWD):"
988
+      list_dir_settings "${BOOTSTRAP_DIR}" "${SETTING_KEY_REGEXP}" | \
989
+                        sed "s/^/mulle-bootstrap setting -r -g/" | \
990
+                        _unescape_linefeeds
991
+
992
+      log_info "Available repository settings:"
993
+      list_build_directories
994
+
995
+      return
996
+   fi
997
+
998
+   local directory
999
+
1000
+   (
1001
+      local OPTION_OVERRIDES
1002
+      local OPTION_GLOBAL
1003
+
1004
+      #
1005
+      # emit overrides
1006
+      #
1007
+      OPTION_OVERRIDES="YES"
1008
+      OPTION_GLOBAL="NO"
1009
+      directory="`_chosen_setting_directory`"
1010
+      log_info "${directory} ($PWD):"
1011
+      list_dir_settings "${directory}" "${SETTING_KEY_REGEXP}" | \
1012
+                        sed "s/^/mulle-bootstrap setting -o /" | \
1013
+                        _unescape_linefeeds
1014
+
1015
+      OPTION_GLOBAL="YES"
1016
+      directory="`_chosen_setting_directory`"
1017
+      log_info "${directory} ($PWD):"
1018
+      list_dir_settings "${directory}" "${SETTING_KEY_REGEXP}" | \
1019
+                        sed "s/^/mulle-bootstrap setting -g -o /" | \
1020
+                        _unescape_linefeeds
1021
+
1022
+      #
1023
+      # emit build directory
1024
+      #
1025
+      OPTION_OVERRIDES="NO"
1026
+      OPTION_GLOBAL="NO"
1027
+      directory="`_chosen_setting_directory "${repository}"`"
1028
+      log_info "${directory} ($PWD):"
1029
+      list_dir_settings "${directory}" "${SETTING_KEY_REGEXP}" | \
1030
+                        sed "s/^/mulle-bootstrap setting -b '${repository}' /" | \
1031
+                        _unescape_linefeeds
1032
+
1033
+      OPTION_GLOBAL="YES"
1034
+      directory="`_chosen_setting_directory "${repository}"`"
1035
+      log_info "${directory} ($PWD):"
1036
+      list_dir_settings "${directory}" "${SETTING_KEY_REGEXP}" | \
1037
+                        sed "s/^/mulle-bootstrap setting -g -b '${repository}' /" | \
1038
+                        _unescape_linefeeds
1039
+
1040
+      #
1041
+      # emit settings directory
1042
+      #
1043
+      #
1044
+      # emit overrides
1045
+      #
1046
+      OPTION_GLOBAL="NO"
1047
+      directory="`_chosen_setting_directory`"
1048
+      log_info "${directory} ($PWD):"
1049
+      list_dir_settings "${directory}" "${SETTING_KEY_REGEXP}" | \
1050
+                        sed "s/^/mulle-bootstrap setting /" | \
1051
+                        _unescape_linefeeds
1052
+
1053
+      OPTION_GLOBAL="YES"
1054
+      directory="`_chosen_setting_directory`"
1055
+      log_info "${directory} ($PWD):"
1056
+      list_dir_settings "${directory}" "${SETTING_KEY_REGEXP}" | \
1057
+                        sed "s/^/mulle-bootstrap setting -g /" | \
1058
+                        _unescape_linefeeds
1059
+   )
929 1060
 }
930 1061
 
931 1062
 
1063
+
932 1064
 _setting_read()
933 1065
 {
934 1066
    local key="$1"
... ...
@@ -939,8 +1071,8 @@ _setting_read()
939 1071
 
940 1072
    if [ "${OPTION_PROCESSED_READ}" = "NO" ]
941 1073
    then
942
-      bootstrapdir="`_chosen_bootstrapdir "${OPTION_GLOBAL}"`"
943
-      directory="`_chosen_setting_directory "${repository}" "${OPTION_GLOBAL}"`"
1074
+      bootstrapdir="`_chosen_bootstrapdir`"
1075
+      directory="`_chosen_setting_directory "${repository}"`"
944 1076
       _read_setting "${directory}/${name}"
945 1077
 
946 1078
       return
... ...
@@ -964,8 +1096,8 @@ _setting_write()
964 1096
    local bootstrapdir
965 1097
    local directory
966 1098
 
967
-   bootstrapdir="`_chosen_bootstrapdir "${OPTION_GLOBAL}"`"
968
-   directory="`_chosen_setting_directory "${repository}" "${OPTION_GLOBAL}"`"
1099
+   bootstrapdir="`_chosen_bootstrapdir`"
1100
+   directory="`_chosen_setting_directory "${repository}"`"
969 1101
 
970 1102
    mkdir_if_missing "${directory}"
971 1103
 
... ...
@@ -986,8 +1118,8 @@ _setting_append()
986 1118
    local bootstrapdir
987 1119
    local directory
988 1120
 
989
-   bootstrapdir="`_chosen_bootstrapdir "${OPTION_GLOBAL}"`"
990
-   directory="`_chosen_setting_directory "${repository}" "${OPTION_GLOBAL}"`"
1121
+   bootstrapdir="`_chosen_bootstrapdir`"
1122
+   directory="`_chosen_setting_directory "${repository}"`"
991 1123
 
992 1124
    mkdir_if_missing "${directory}"
993 1125
 
... ...
@@ -1001,7 +1133,7 @@ _setting_append()
1001 1133
    [ -z "${MULLE_BOOTSTRAP_REPOSITORIES_SH}" ] && . mulle-bootstrap-repositories.sh
1002 1134
 
1003 1135
    case "${key}" in
1004
-      embedded_repositories|repositories)
1136
+      embedded_repositories|repositories|additional_repositories)
1005 1137
          redirect_exekutor "${filename}" merge_repository_contents "${before}" "${value}"
1006 1138
       ;;
1007 1139
 
... ...
@@ -1023,8 +1155,8 @@ _setting_delete()
1023 1155
    local bootstrapdir
1024 1156
    local directory
1025 1157
 
1026
-   bootstrapdir="`_chosen_bootstrapdir "${OPTION_GLOBAL}"`"
1027
-   directory="`_chosen_setting_directory "${repository}" "${OPTION_GLOBAL}"`"
1158
+   bootstrapdir="`_chosen_bootstrapdir`"
1159
+   directory="`_chosen_setting_directory "${repository}"`"
1028 1160
 
1029 1161
    local filename
1030 1162
 
... ...
@@ -1040,13 +1172,13 @@ _setting_delete()
1040 1172
 _config_list()
1041 1173
 {
1042 1174
    log_info "environment:"
1043
-   list_environment_settings | sed "s/^/setenv /"
1175
+   list_environment_settings | sed "s/^/setenv /" | _unescape_linefeeds
1044 1176
 
1045 1177
    log_info ".bootstrap.local/config ($PWD):"
1046
-   list_local_config_settings | sed "s/^/mulle-bootstrap config /"
1178
+   list_local_config_settings | sed "s/^/mulle-bootstrap config /" | _unescape_linefeeds
1047 1179
 
1048 1180
    log_info "~/.mulle-bootstrap:"
1049
-   list_home_config_settings | sed "s/^/mulle-bootstrap config -h /"
1181
+   list_home_config_settings | sed "s/^/mulle-bootstrap config -h /" | _unescape_linefeeds
1050 1182
 }
1051 1183
 
1052 1184
 
... ...
@@ -1116,7 +1248,7 @@ _expansion_read()
1116 1248
 
1117 1249
    if [ "${OPTION_PROCESSED_READ}" = "NO" ]
1118 1250
    then
1119
-      bootstrapdir="`_chosen_bootstrapdir "${OPTION_GLOBAL}"`"
1251
+      bootstrapdir="`_chosen_bootstrapdir`"
1120 1252
       _read_setting "${bootstrapdir}/${key}"
1121 1253
 
1122 1254
       return
... ...
@@ -1130,7 +1262,7 @@ _expansion_write()
1130 1262
 {
1131 1263
    local bootstrapdir
1132 1264
 
1133
-   bootstrapdir="`_chosen_bootstrapdir "${OPTION_GLOBAL}"`"
1265
+   bootstrapdir="`_chosen_bootstrapdir`"
1134 1266
    mkdir_if_missing "${bootstrapdir}"
1135 1267
 
1136 1268
    redirect_exekutor "${bootstrapdir}/$1" echo "$2"
... ...
@@ -1148,7 +1280,7 @@ _expansion_delete()
1148 1280
 {
1149 1281
    local bootstrapdir
1150 1282
 
1151
-   bootstrapdir="`_chosen_bootstrapdir "${OPTION_GLOBAL}"`"
1283
+   bootstrapdir="`_chosen_bootstrapdir`"
1152 1284
 
1153 1285
    remove_file_if_present "${bootstrapdir}/$1"
1154 1286
    exekutor touch "${bootstrapdir}"
... ...
@@ -1172,10 +1304,10 @@ list_global_expansions()
1172 1304
 _expansion_list()
1173 1305
 {
1174 1306
    log_info ".bootstrap.local ($PWD):"
1175
-   list_local_expansions | sed "s/^/mulle-bootstrap expansion /"
1307
+   list_local_expansions | sed "s/^/mulle-bootstrap expansion /" | _unescape_linefeeds
1176 1308
 
1177 1309
    log_info ".bootstrap ($PWD):"
1178
-   list_global_expansions | sed "s/^/mulle-bootstrap expansion -g/"
1310
+   list_global_expansions | sed "s/^/mulle-bootstrap expansion -g/" | _unescape_linefeeds
1179 1311
 }
1180 1312
 
1181 1313
 
... ...
@@ -1187,8 +1319,11 @@ _generic_main()
1187 1319
 
1188 1320
    local OPTION_APPEND="NO"
1189 1321
    local OPTION_GLOBAL="NO"
1190
-   local OPTION_USER="NO"
1322
+   local OPTION_OVERRIDES="NO"
1191 1323
    local OPTION_PROCESSED_READ="NO"
1324
+   local OPTION_ROOT="NO"
1325
+   local OPTION_USER="NO"
1326
+
1192 1327
    local key
1193 1328
    local value
1194 1329
    local command
... ...
@@ -1234,9 +1369,25 @@ _generic_main()
1234 1369
 
1235 1370
          setting)
1236 1371
             case "$1" in
1237
-               -r|--repository)
1372
+               -b|--build-repository-setting)
1238 1373
                   [ $# -ne 0 ] || fail "repository name missing"
1374
+                  shift
1239 1375
                   repository="$1"
1376
+
1377
+                  shift
1378
+                  continue
1379
+               ;;
1380
+
1381
+               -o|--override)
1382
+                  OPTION_OVERRIDES="YES"
1383
+
1384
+                  shift
1385
+                  continue
1386
+               ;;
1387
+
1388
+               -r|--root)
1389
+                  OPTION_ROOT="YES"
1390
+
1240 1391
                   shift
1241 1392
                   continue
1242 1393
                ;;
... ...
@@ -1345,17 +1496,30 @@ _generic_main()
1345 1496
       ${type}_usage
1346 1497
    fi
1347 1498
 
1499
+   if [ "${OPTION_ROOT}" = "YES" -a "${OPTION_OVERRIDES}" = "YES" ]
1500
+   then
1501
+      fail "You can't set overrides and root at the same time"
1502
+   fi
1503
+   if [ "${OPTION_OVERRIDES}" = "YES" -a ! -z "${repositories}" ]
1504
+   then
1505
+      fail "You can't set overrides and repository at the same time"
1506
+   fi
1507
+   if [ "${OPTION_ROOT}" = "YES" -a ! -z "${repositories}" ]
1508
+   then
1509
+      fail "You can't set root and repository at the same time"
1510
+   fi
1511
+
1348 1512
    case "${command}" in
1349
-      read)
1350
-         _${type}_read "${key}" "${repository}"
1513
+      delete)
1514
+         _${type}_delete "${key}" "${repository}"
1351 1515
       ;;
1352 1516
 
1353 1517
       list)
1354 1518
          _${type}_list "${repository}"
1355 1519
       ;;
1356 1520
 
1357
-      delete)
1358
-         _${type}_delete "${key}" "${repository}"
1521
+      read)
1522
+         _${type}_read "${key}" "${repository}"
1359 1523
       ;;
1360 1524
 
1361 1525
       write)
... ...
@@ -128,7 +128,6 @@ show_repository()
128 128
       printf "%b" "${C_BOLD}"
129 129
    fi
130 130
 
131
-
132 131
    if [ "${PARENT_REPOSITORY_NAME}" ]
133 132
    then
134 133
       printf "%b"  "${PARENT_REPOSITORY_NAME}/"
... ...
@@ -207,6 +206,9 @@ show_raw_repositories()
207 206
       SHOW_PREFIX="${SHOW_PREFIX}   "
208 207
       clones="`read_raw_setting "repositories"`"
209 208
       walk_raw_clones "${clones}" "show_raw_repository"
209
+
210
+      clones="`read_raw_setting "additional_repositories"`"
211
+      walk_raw_clones "${clones}" "show_raw_repository"
210 212
    )
211 213
 }
212 214
 
... ...
@@ -241,6 +243,7 @@ show_raw_minions()
241 243
    )
242 244
 }
243 245
 
246
+
244 247
 show_minions()
245 248
 {
246 249
    (
... ...
@@ -263,6 +266,11 @@ minion"
263 266
                              "show_repository" \
264 267
                              "${permissions}" \
265 268
                              "${REPOS_DIR}"
269
+
270
+      walk_auto_repositories "additional_repositories"  \
271
+                             "show_repository" \
272
+                             "${permissions}" \
273
+                             "${REPOS_DIR}"
266 274
    )
267 275
 }
268 276