Browse code

`tag` checks in all repositories, that a tag does not exist. Remove some fluff from regular output. Fix a bug involving settings copy (build_ignore became a directory bug) Executed commands are now prefixed with ==> for better readability. Always redo bootstrap.auto folder on fetch, which means that you don't need to clean dist anymore after editing .bootstrap files. Forgot to write-protect dependencies, when only partial builds were done.

Nat! authored on 08-02-2016 12:02:24
Showing 11 changed files
... ...
@@ -24,13 +24,13 @@ SHELLFLAGS=-x -e SC2164,SC2166,SC2006 -s sh
24 24
 
25 25
 %.chk:	%.sh
26 26
 		- shellcheck $(SHELLFLAGS) $<
27
-		(shellcheck -f json $(SHELLFLAGS) $< | jq '.[].level' | grep error > /dev/null ) && exit 1 || touch $@
27
+		(shellcheck -f json $(SHELLFLAGS) $< | jq '.[].level' | grep -w error > /dev/null ) && exit 1 || touch $@
28 28
 
29 29
 all:	$(CHECKSTAMPS) mulle-bootstrap.chk shellcheck_check jq_check
30 30
 
31 31
 mulle-bootstrap.chk:	mulle-bootstrap
32 32
 		- shellcheck $(SHELLFLAGS) $<
33
-		(shellcheck -f json $(SHELLFLAGS) $< | jq '.[].level' | grep error > /dev/null ) && exit 1 || touch $@
33
+		(shellcheck -f json $(SHELLFLAGS) $< | jq '.[].level' | grep -w error > /dev/null ) && exit 1 || touch $@
34 34
 
35 35
 install:
36 36
 	@ ./install.sh
... ...
@@ -1,3 +1,13 @@
1
+0.15
2
+===
3
+   `tag` checks in all repositories, that a tag does not exist.
4
+   Remove some fluff from regular output.
5
+   Fix a bug involving settings copy  (build_ignore became a directory bug)
6
+   Executed commands are now prefixed with ==> for better readability.
7
+   Always redo bootstrap.auto folder on fetch, which means that you don't need
8
+   to clean dist anymore after editing .bootstrap files.
9
+   Forgot to write-protect dependencies, when only partial builds were done.
10
+
1 11
 0.14
2 12
 ===
3 13
    Fix various uglies.
... ...
@@ -20,12 +30,11 @@
20 30
 ===
21 31
    Fixes another stale headers problem. Project is creeping towards a 1.0.
22 32
 
23
-
24 33
 0.10
25 34
 ===
26 35
    Fetch settings can be platform specific by using the `uname` as a file
27
-   extension. e.g. repositories.Darwin. Other settings may follow, if the need arises.
28
-   So far it hasn't.
36
+   extension. e.g. repositories.Darwin. Other settings may follow, if the need
37
+   arises. So far it hasn't.
29 38
 
30 39
    Added "embedded_repositories" for those special moments, where you don't want
31 40
    to link another project, but just steal a few files. These gits are installed
... ...
@@ -13,10 +13,10 @@ then
13 13
          # Useable Foreground colours, for black/white white/black
14 14
          C_RED="\033[0;31m"     C_GREEN="\033[0;32m"
15 15
          C_BLUE="\033[0;34m"    C_MAGENTA="\033[0;35m"
16
-         C_CYAN="\033[0;36m"    
16
+         C_CYAN="\033[0;36m"
17 17
 
18
-         C_BR_RED="\033[0;91m" C_BR_YELLOW="\033[0;93m"
19
-         C_BOLD="\033[1m" 
18
+         C_BR_RED="\033[0;91m"
19
+         C_BOLD="\033[1m"
20 20
 
21 21
          #
22 22
          # restore colors if stuff gets wonky
... ...
@@ -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.14
32
+VERSION=0.15
33 33
 
34 34
 #
35 35
 # This is the main user interface to mulle-bootstrap
... ...
@@ -362,10 +362,11 @@ build_fail()
362 362
    if [ -f "${1}" ]
363 363
    then
364 364
       printf "${C_RED}"
365
-      grep -A5 "error:" "${1}" >&2
365
+      egrep -B1 -A5 -w "[Ee]rror" "${1}" >&2
366 366
       printf "${C_RESET}"
367 367
    fi
368 368
 
369
+   log_info "Check the build log: ${C_RESET_BOLD}${1}${C_INFO}"
369 370
    fail "$2 failed"
370 371
 }
371 372
 
... ...
@@ -450,7 +451,7 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
450 451
    logfile1="`build_log_name "cmake" "${name}" "${configuration}" "${sdk}"`"
451 452
    logfile2="`build_log_name "make" "${name}" "${configuration}" "${sdk}"`"
452 453
 
453
-   log_info "Build logs will be in \"${logfile1}\" and \"${logfile2}\""
454
+   log_fluff "Build logs will be in \"${logfile1}\" and \"${logfile2}\""
454 455
 
455 456
    owd="${PWD}"
456 457
    mkdir_if_missing "${builddir}"
... ...
@@ -565,7 +566,7 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
565 566
    logfile1="`build_log_name "configure" "${name}" "${configuration}" "${sdk}"`"
566 567
    logfile2="`build_log_name "make" "${name}" "${configuration}" "${sdk}"`"
567 568
 
568
-   log_info "Build logs will be in \"${logfile1}\" and \"${logfile2}\""
569
+   log_fluff "Build logs will be in \"${logfile1}\" and \"${logfile2}\""
569 570
 
570 571
    owd="${PWD}"
571 572
    mkdir_if_missing "${builddir}"
... ...
@@ -794,12 +795,12 @@ build_xcodebuild()
794 795
    info=""
795 796
    if [ ! -z "${targetname}" ]
796 797
    then
797
-      info=" Target ${C_MAGENTA}${targetname}${C_INFO}"
798
+      info=" Target ${C_MAGENTA}${C_BOLD}${targetname}${C_INFO}"
798 799
    fi
799 800
 
800 801
    if [ ! -z "${schemename}" ]
801 802
    then
802
-      info=" Scheme ${C_MAGENTA}${schemename}${C_INFO}"
803
+      info=" Scheme ${C_MAGENTA}${C_BOLD}${schemename}${C_INFO}"
803 804
    fi
804 805
 
805 806
    log_info "Let ${C_RESET_BOLD}xcodebuild${C_INFO} do a \
... ...
@@ -916,7 +917,7 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
916 917
    mkdir_if_missing "${BUILDLOG_SUBDIR}"
917 918
 
918 919
    logfile="`build_log_name "xcodebuild" "${name}" "${configuration}" "${targetname}" "${schemename}" "${sdk}"`"
919
-   log_info "Build log will be in: ${C_RESET_BOLD}${logfile}${C_INFO}"
920
+   log_fluff "Build log will be in: ${C_RESET_BOLD}${logfile}${C_INFO}"
920 921
 
921 922
    set -f
922 923
 
... ...
@@ -1169,7 +1170,7 @@ build_script()
1169 1170
    mkdir_if_missing "${BUILDLOG_SUBDIR}"
1170 1171
 
1171 1172
    logfile="${BUILDLOG_SUBDIR}/${name}-${configuration}-${sdk}.script.log"
1172
-   log_info "Build log will be in: ${C_RESET_BOLD}${logfile}${C_INFO}"
1173
+   log_fluff "Build log will be in: ${C_RESET_BOLD}${logfile}${C_INFO}"
1173 1174
 
1174 1175
    local owd
1175 1176
 
... ...
@@ -1187,7 +1188,12 @@ build_script()
1187 1188
          logfile="/dev/null"
1188 1189
       fi
1189 1190
 
1190
-      log_info "Running build script for ${C_MAGENTA}${C_BOLD}${configuration}${C_INFO}"
1191
+      log_info "Let ${C_RESET_BOLD}script${C_INFO} do a \
1192
+${C_MAGENTA}${C_BOLD}${configuration}${C_INFO} build of \
1193
+${C_MAGENTA}${C_BOLD}${name}${C_INFO} for SDK \
1194
+${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
1195
+\"${builddir}\" ..."
1196
+
1191 1197
       run_log_script "${owd}/${script}" \
1192 1198
          "${configuration}" \
1193 1199
          "${owd}/${srcdir}" \
... ...
@@ -1608,14 +1614,8 @@ main()
1608 1614
 
1609 1615
    build_clones "$@"
1610 1616
 
1611
-   if [ $# -eq 0 ]
1612
-   then
1613
-      if [ "${clean}" = "YES" -a -d "${DEPENDENCY_SUBDIR}" ]
1614
-      then
1615
-         log_info "Write-protecting \"${DEPENDENCY_SUBDIR}\" to avoid spurious header edits"
1616
-         exekutor chmod -R a-w "${DEPENDENCY_SUBDIR}"
1617
-      fi
1618
-   fi
1617
+   log_info "Write-protecting ${C_RESET_BOLD}${DEPENDENCY_SUBDIR}${C_INFO} to avoid spurious header edits"
1618
+   exekutor chmod -R a-w "${DEPENDENCY_SUBDIR}"
1619 1619
 }
1620 1620
 
1621 1621
 main "$@"
... ...
@@ -398,40 +398,39 @@ bootstrap_auto_update()
398 398
    old="${IFS:-" "}"
399 399
 
400 400
    #
401
-   # prepare auto folder if it doesn't exist yet
402
-   # means copy our own files to .auto first,
401
+   # if an auto folder exists it could be stale, due to user edits
402
+   # it's better to completely redo it
403 403
    #
404
-   if [ ! -d "${BOOTSTRAP_SUBDIR}.auto" ]
405
-   then
406
-      log_info "Found a .bootstrap folder for \"${name}\" will set up ${BOOTSTRAP_SUBDIR}.auto"
407 404
 
408
-      mkdir_if_missing "${BOOTSTRAP_SUBDIR}.tmp/settings"
405
+   mkdir_if_missing "${BOOTSTRAP_SUBDIR}.tmp/settings"
409 406
 
410
-      IFS="
407
+   IFS="
411 408
 "
412
-      for i in $INHERIT_SETTINGS
413
-      do
414
-         IFS="${old}"
415
-         if [ -f "${BOOTSTRAP_SUBDIR}.local/${i}" ]
409
+   for i in $INHERIT_SETTINGS
410
+   do
411
+      IFS="${old}"
412
+      if [ -f "${BOOTSTRAP_SUBDIR}.local/${i}" ]
413
+      then
414
+         exekutor cp "${BOOTSTRAP_SUBDIR}.local/${i}" "${BOOTSTRAP_SUBDIR}.tmp/${i}" || exit 1
415
+      else
416
+         if [ -f "${BOOTSTRAP_SUBDIR}/${i}" ]
416 417
          then
417
-            exekutor cp "${BOOTSTRAP_SUBDIR}.local/${i}" "${BOOTSTRAP_SUBDIR}.tmp/${i}" || exit 1
418
+            exekutor cp "${BOOTSTRAP_SUBDIR}/${i}" "${BOOTSTRAP_SUBDIR}.tmp/${i}" || exit 1
418 419
          else
419
-            if [ -f "${BOOTSTRAP_SUBDIR}/${i}" ]
420
-            then
421
-               exekutor cp "${BOOTSTRAP_SUBDIR}/${i}" "${BOOTSTRAP_SUBDIR}.tmp/${i}" || exit 1
422
-            else
423
-               name="`basename -- "${i}"`"
424
-               log_fluff "Setting \"${name}\" is not specified, so not inherited"
425
-            fi
420
+            name="`basename -- "${i}"`"
421
+            log_fluff "Setting \"${name}\" is not specified, so not inherited"
426 422
          fi
427
-      done
428
-      IFS="${old}"
429
-
430
-      # now move it
431
-      exekutor mv "${BOOTSTRAP_SUBDIR}.tmp" "${BOOTSTRAP_SUBDIR}.auto" || exit 1
423
+      fi
424
+   done
425
+   IFS="${old}"
432 426
 
433
-      # leave .scm files behind
427
+   # now move it
428
+   if [ -d "${BOOTSTRAP_SUBDIR}.auto" ]
429
+   then
430
+      executor rm -rf  "${BOOTSTRAP_SUBDIR}.auto"
434 431
    fi
432
+   exekutor mv "${BOOTSTRAP_SUBDIR}.tmp" "${BOOTSTRAP_SUBDIR}.auto" || exit 1
433
+
435 434
 
436 435
    #
437 436
    # prepend new contents to old contents
... ...
@@ -440,7 +439,7 @@ bootstrap_auto_update()
440 439
    local srcfile
441 440
    local dstfile
442 441
    local i
443
-
442
+   local settingname
444 443
    IFS="
445 444
 "
446 445
    for i in $INHERIT_SETTINGS
... ...
@@ -448,10 +447,10 @@ bootstrap_auto_update()
448 447
       IFS="{old}"
449 448
       srcfile="${dir}/.bootstrap/${i}"
450 449
       dstfile="${BOOTSTRAP_SUBDIR}.auto/${i}"
451
-      name="`basename -- "${i}"`"
450
+      settingname="`basename -- "${i}"`"
452 451
       if [ -f "${srcfile}" ]
453 452
       then
454
-         log_fluff "Inheriting \"${name}\" from \"${srcfile}\""
453
+         log_fluff "Inheriting \"${settingname}\" from \"${srcfile}\""
455 454
 
456 455
          mkdir_if_missing "${BOOTSTRAP_SUBDIR}.auto/`dirname -- "${i}"`"
457 456
          if [ -f "${BOOTSTRAP_SUBDIR}.auto/${i}" ]
... ...
@@ -467,7 +466,7 @@ bootstrap_auto_update()
467 466
             exekutor cp "${srcfile}" "${dstfile}" || exit 1
468 467
          fi
469 468
       else
470
-         log_fluff "Setting \"${name}\" is not specified, so not inherited"
469
+         log_fluff "Setting \"${settingname}\" is not specified, so not inherited"
471 470
       fi
472 471
    done
473 472
    IFS="{old}"
... ...
@@ -635,7 +634,7 @@ checkout()
635 634
    then
636 635
       log_error "Stale folders \"${DEPENDENCY_SUBDIR}\" and/or \"${CLONESBUILD_SUBDIR}\" found."
637 636
       log_error "Please remove them before continuing."
638
-      log_info  "Suggested command: ${C_RESET}mulle-bootstrap clean output${C_INFO}"
637
+      log_info  "Suggested command: ${C_RESET_BOLD}mulle-bootstrap clean output${C_INFO}"
639 638
       exit 1
640 639
    fi
641 640
 
... ...
@@ -1183,11 +1182,6 @@ main()
1183 1182
          exit 1
1184 1183
       fi
1185 1184
 
1186
-      if [ -d "${BOOTSTRAP_SUBDIR}.auto" ]
1187
-      then
1188
-         log_warning "Folder \"${BOOTSTRAP_SUBDIR}.auto\" already exists!"
1189
-      fi
1190
-
1191 1185
       clone_repositories
1192 1186
 
1193 1187
       install_embedded_repositories
... ...
@@ -42,7 +42,7 @@ then
42 42
          C_BLUE="\033[0;34m"    C_MAGENTA="\033[0;35m"
43 43
          C_CYAN="\033[0;36m"
44 44
 
45
-         C_BR_RED="\033[0;91m" C_BR_YELLOW="\033[0;93m"
45
+         C_BR_RED="\033[0;91m"
46 46
          C_BOLD="\033[1m"
47 47
          C_FAINT="\033[2m"
48 48
 
... ...
@@ -125,7 +125,7 @@ eval_exekutor()
125 125
 {
126 126
    if [ "${MULLE_BOOTSTRAP_DRY_RUN}" = "YES" -o "${MULLE_BOOTSTRAP_TRACE}" = "YES" ]
127 127
    then
128
-      echo "$@" >&2
128
+      echo "==> " "$@" >&2
129 129
    fi
130 130
 
131 131
    if [ "${MULLE_BOOTSTRAP_DRY_RUN}" != "YES" ]
... ...
@@ -137,7 +137,7 @@ eval_exekutor()
137 137
 
138 138
 logging_eval_exekutor()
139 139
 {
140
-   echo "$@"
140
+   echo "==>" "$@"
141 141
    eval_exekutor "$@"
142 142
 }
143 143
 
... ...
@@ -146,7 +146,7 @@ exekutor()
146 146
 {
147 147
    if [ "${MULLE_BOOTSTRAP_DRY_RUN}" = "YES" -o "${MULLE_BOOTSTRAP_TRACE}" = "YES" ]
148 148
    then
149
-      echo "$@" >&2
149
+      echo "==>" "$@" >&2
150 150
    fi
151 151
 
152 152
    if [ "${MULLE_BOOTSTRAP_DRY_RUN}" != "YES" ]
... ...
@@ -158,7 +158,7 @@ exekutor()
158 158
 
159 159
 logging_exekutor()
160 160
 {
161
-   echo "$@"
161
+   echo "==>" "$@"
162 162
    exekutor "$@"
163 163
 }
164 164
 
... ...
@@ -576,7 +576,7 @@ run_script()
576 576
 
577 577
    if [ -x "${script}" ]
578 578
    then
579
-      log_info "Executing script \"${script}\" $1"
579
+      log_fluff "Executing script \"${script}\" $1"
580 580
       exekutor "${script}" "$@" || fail "script \"${script}\" did not run successfully"
581 581
    else
582 582
       if [ ! -e "${script}" ]
... ...
@@ -168,7 +168,7 @@ Now add your repositories to \"${BOOTSTRAP_SUBDIR}/repositories${C_INFO}"
168 168
   open="`read_config_setting "open_repositories_file" "ASK"`"
169 169
   if [ "${open}" = "ASK" ]
170 170
   then
171
-    user_say_yes "Edit the ${C_MAGENTA}repositories${C_RESET} file now ?"
171
+    user_say_yes "Edit the ${C_MAGENTA}${C_BOLD}repositories${C_RESET_BOLD} file now ?"
172 172
     if [ $? -eq 0 ]
173 173
     then
174 174
        open="YES"
... ...
@@ -37,12 +37,21 @@ git_checkout_tag()
37 37
    dst="$1"
38 38
    tag="$2"
39 39
 
40
-   log_info "Checking out ${C_MAGENTA}${tag}${C_INFO} ..."
41
-   ( exekutor cd "${dst}" ; exekutor git checkout ${GITFLAGS} "${tag}" )
40
+   local flags
41
+
42
+   # checkout don't know -v
43
+   flags="${GITFLAGS}"
44
+   if [ "${flags}" = "-v" ]
45
+   then
46
+      flags=""
47
+   fi
48
+
49
+   log_info "Checking out ${C_MAGENTA}${C_BOLD}${tag}${C_INFO} ..."
50
+   ( exekutor cd "${dst}" ; exekutor git checkout ${flags} "${tag}" )
42 51
 
43 52
    if [ $? -ne 0 ]
44 53
    then
45
-      log_error "Checkout failed, moving ${C_CYAN}${dst}${C_ERROR} to {C_CYAN}${dst}.failed${C_ERROR}"
54
+      log_error "Checkout failed, moving ${C_CYAN}${C_BOLD}${dst}${C_ERROR} to ${C_CYAN}${C_BOLD}${dst}.failed${C_ERROR}"
46 55
       log_error "You need to fix this manually and then move it back."
47 56
       log_info "Hint: check ${BOOTSTRAP_SUBDIR}/`basename -- "${dst}"`/TAG" >&2
48 57
 
... ...
@@ -68,7 +77,7 @@ git_clone()
68 77
    [ ! -z "$src" ] || internal_fail "src is empty"
69 78
    [ ! -z "$dst" ] || internal_fail "dst is empty"
70 79
 
71
-   log_info "Cloning ${C_MAGENTA}${src}${C_INFO} ..."
80
+   log_info "Cloning ${C_MAGENTA}${C_BOLD}${src}${C_INFO} ..."
72 81
    exekutor git clone ${flags} ${GITFLAGS} "${src}" "${dst}" || fail "git clone of \"${src}\" into \"${dst}\" failed"
73 82
 
74 83
    if [ "${tag}" != "" ]
... ...
@@ -88,7 +97,7 @@ git_pull()
88 97
 
89 98
    [ ! -z "$dst" ] || internal_fail "dst is empty"
90 99
 
91
-   log_info "Updating ${C_MAGENTA}${dst}${C_INFO} ..."
100
+   log_info "Updating ${C_MAGENTA}${C_BOLD}${dst}${C_INFO} ..."
92 101
    ( exekutor cd "${dst}" ; exekutor git pull ${GITFLAGS} ) || fail "git pull of \"${dst}\" failed"
93 102
 
94 103
    if [ "${tag}" != "" ]
... ...
@@ -135,7 +144,7 @@ svn_update()
135 144
 
136 145
    [ ! -z "$dst" ] || internal_fail "dst is empty"
137 146
 
138
-   log_info "SVN updating ${C_MAGENTA}${dst}${C_INFO} ..."
147
+   log_info "SVN updating ${C_MAGENTA}${C_BOLD}${dst}${C_INFO} ..."
139 148
 
140 149
    local flags
141 150
 
... ...
@@ -165,7 +165,7 @@ _read_environment_setting()
165 165
 
166 166
    if [ "${MULLE_BOOTSTRAP_VERBOSE}" = "YES" ]
167 167
    then
168
-      log_trace "Setting ${C_MAGENTA}${name}${C_TRACE} found in environment variable \"${envname}\" as ${C_MAGENTA}${value}${C_TRACE}"
168
+      log_trace "Setting ${C_MAGENTA_BOLD}${name}${C_TRACE} found in environment variable \"${envname}\" as ${C_MAGENTA_BOLD}${value}${C_TRACE}"
169 169
    fi
170 170
 
171 171
    warn_environment_setting "${envname}"
... ...
@@ -200,7 +200,7 @@ _read_local_setting()
200 200
 
201 201
    if [ "${MULLE_BOOTSTRAP_VERBOSE}" = "YES" ]
202 202
    then
203
-      log_trace "Setting ${C_MAGENTA}${name}${C_TRACE} found in \"~/.mulle-bootstrap\" as ${C_MAGENTA}${value}${C_TRACE}"
203
+      log_trace "Setting ${C_MAGENTA_BOLD}${name}${C_TRACE} found in \"~/.mulle-bootstrap\" as ${C_MAGENTA_BOLD}${value}${C_TRACE}"
204 204
    fi
205 205
    warn_user_setting "${HOME}/.mulle-bootstrap/${name}"
206 206
 
... ...
@@ -111,7 +111,7 @@ then
111 111
 
112 112
    check_and_usage_and_help
113 113
 
114
-   log_info "Set vendortag to \"${VENDOR_TAG}\""
114
+   log_info "Will use \"${VENDOR_TAG}\" to tag clones"
115 115
 else
116 116
    check_and_usage_and_help
117 117
 fi
... ...
@@ -119,6 +119,28 @@ fi
119 119
 REPO="."
120 120
 
121 121
 
122
+git_tag_unknown()
123
+{
124
+   local name
125
+   local tag
126
+
127
+   name="${1:-${PWD}}"
128
+   tag="${2}"
129
+
130
+   if [ ! -d .git ]
131
+   then
132
+      fail "\"${name}\" is not a git repository"
133
+   fi
134
+
135
+   git reflog "${tag}" -- > /dev/null  2>&1
136
+   if [ "$?" -eq 0 ]
137
+   then
138
+      log_error "Repository \"$name\" is already tagged with \"$2\"."
139
+      exit 1
140
+   fi
141
+}
142
+
143
+
122 144
 git_must_be_clean()
123 145
 {
124 146
    local name
... ...
@@ -166,6 +188,35 @@ ensure_repos_clean()
166 188
 }
167 189
 
168 190
 
191
+ensure_tags_unknown()
192
+{
193
+   local tag
194
+   local vendortag
195
+
196
+   tag="$1"
197
+   vendortag="$2"
198
+
199
+   #
200
+   # Make sure that tagging is OK
201
+   # all git repos must be clean
202
+   #
203
+   (cd "${REPO}" ; git_tag_unknown "${REPO}" "${tag}" ) || exit 1
204
+
205
+   if  dir_has_files "${CLONES_SUBDIR}"
206
+   then
207
+      for i in "${CLONES_SUBDIR}"/*
208
+      do
209
+         # only tag what looks like a git repo
210
+         if [ -d "${i}/.git" -o -d "${i}/refs" ]
211
+         then
212
+            (cd "${i}" ; git_tag_unknown "${i}" "${vendortag}" ) || exit 1
213
+         fi
214
+      done
215
+   fi
216
+}
217
+
218
+
219
+
169 220
 tag()
170 221
 {
171 222
    local i
... ...
@@ -205,6 +256,7 @@ main()
205 256
 {
206 257
    log_fluff "::: tag :::"
207 258
 
259
+   ensure_tags_unknown "${TAG}" "${VENDOR_TAG}"
208 260
    ensure_repos_clean
209 261
 
210 262
    echo "Will tag `basename -- "${PWD}"` with ${TAG}" >&2