Browse code

* add --lenient flag to mulle-bootstrap, used in mulle-bootstrap git to not abort on failure

Nat! authored on 20-09-2017 21:21:15
Showing 4 changed files
... ...
@@ -1,3 +1,7 @@
1
+### 3.13.3
2
+
3
+* add --lenient flag to mulle-bootstrap, used in mulle-bootstrap git to not abort on failure
4
+
1 5
 ### 3.13.1
2 6
 
3 7
 * use CC, CXX and MAKE internally and heed possible external environment variable of same name
... ...
@@ -31,7 +31,7 @@
31 31
 #
32 32
 MULLE_EXECUTABLE_VERSION_MAJOR=3
33 33
 MULLE_EXECUTABLE_VERSION_MINOR=13
34
-MULLE_EXECUTABLE_VERSION_PATCH=2
34
+MULLE_EXECUTABLE_VERSION_PATCH=3
35 35
 
36 36
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
37 37
 
... ...
@@ -359,6 +359,7 @@ bootstrap_main()
359 359
    local MULLE_FLAG_MAGNUM_FORCE="NONE"
360 360
    local MULLE_FLAG_IGNORE_GRAVEYARD="NO"
361 361
    local MULLE_FLAG_VERBOSE_BUILD="NO"
362
+   local MULLE_FLAG_LENIENT="NO"
362 363
 
363 364
    # technical flags
364 365
    local MULLE_FLAG_DONT_DEFER="NO"
... ...
@@ -397,6 +398,10 @@ bootstrap_main()
397 398
             MULLE_FLAG_ANSWER="YES"
398 399
          ;;
399 400
 
401
+         --lenient)
402
+            MULLE_FLAG_LENIENT="YES"
403
+         ;;
404
+
400 405
          --no-defer)
401 406
             MULLE_FLAG_DONT_DEFER="YES"
402 407
          ;;
... ...
@@ -62,7 +62,7 @@ log_main()
62 62
             log_usage
63 63
          ;;
64 64
 
65
-         -l|--l)
65
+         -l|--list)
66 66
             OPTION_LIST="YES"
67 67
          ;;
68 68
 
... ...
@@ -631,7 +631,12 @@ _run_git_on_stash()
631 631
       (
632 632
          cd "$i" ;
633 633
          exekutor git ${GITFLAGS} "$@" ${GITOPTIONS}  >&2
634
-      ) || fail "git failed"
634
+      )
635
+      if [ $? -ne 0 -a "${MULLE_FLAG_LENIENT}" = "NO" ]
636
+      then
637
+         fail "git failed, use \`${MULLE_EXECUTABLE} --lenient git\` to ignore"
638
+      fi
639
+
635 640
       log_info
636 641
    fi
637 642
 }
... ...
@@ -678,15 +683,11 @@ git_main()
678 683
    [ -z "${MULLE_BOOTSTRAP_LOCAL_ENVIRONMENT_SH}" ] && . mulle-bootstrap-local-environment.sh
679 684
    [ -z "${MULLE_BOOTSTRAP_SCRIPTS_SH}" ]           && . mulle-bootstrap-scripts.sh
680 685
 
681
-   while :
682
-   do
683
-      if [ "$1" = "-h" -o "$1" = "--help" ]
684
-      then
685
-         git_usage
686
-      fi
687
-
688
-      break
689
-   done
686
+   # hmm
687
+   if [ "$1" = "-h" -o "$1" = "--help" ]
688
+   then
689
+      git_usage
690
+   fi
690 691
 
691 692
    if dir_has_files "${REPOS_DIR}"
692 693
    then