Browse code

fix warn scripts

Nat! authored on 13-10-2015 17:10:31
Showing 3 changed files
... ...
@@ -27,10 +27,10 @@ git@github.com:mulle-nat/UISS.git
27 27
 git@github.com:mulle-nat/Finch.git
28 28
 ```
29 29
 
30
-Now **mulle-bootstrap** can iterate over them and check them out into a common
31
-directory `.repos`. If  there is a local clone of the repository **MulleScion**
32
-in the parent directory of the projeczt, then mulle-bootstrap can clone (or
33
-even symlink) from there, if you want.
30
+**mulle-bootstrap** will check them out into a common directory `.repos`. If
31
+there is a local clone of the repository **MulleScion** in the parent directory
32
+of the project, then mulle-bootstrap can clone (or even symlink) from there,
33
+if you want.
34 34
 
35 35
 After cloning **mulle-bootstrap** does a simple security check with respect to
36 36
 `.bootstrap` shell scripts and Xcode script phases. Finally it looks for a
... ...
@@ -39,11 +39,11 @@ dependencies too, if they do, those dependencies are added to the source
39 39
 repositories dependencies.
40 40
 
41 41
 Everything you need should be present at this time. so **mulle-bootstrap** will
42
-now  build a **Debug** and a **Release** version for each library, and places
42
+now build a **Debug** and a **Release** version for each library, and place
43 43
 the headers and the produced libraries into "./dependencies".
44 44
 
45 45
 Your Xcode project can be optionally massaged by
46
-**mulle-bootstrap setup-xcode** to have the "./dependencies" folder in its
46
+**mulle-bootstrap xcode add** to have the "./dependencies" folder in its
47 47
 search paths.
48 48
 
49 49
 ## What a project user needs to do
... ...
@@ -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.8
32
+VERSION=0.8.1
33 33
 
34 34
 #
35 35
 # This is the main user interface to mulle-bootstrap
... ...
@@ -136,9 +136,6 @@ EOF
136 136
 command=${1:-"bootstrap"}
137 137
 shift
138 138
 
139
-. mulle-bootstrap-warn-scripts.sh
140
-
141
-
142 139
 
143 140
 bootstrap()
144 141
 {
... ...
@@ -156,7 +153,7 @@ bootstrap()
156 153
       . install.sh "$@"
157 154
       export MULLE_BOOTSTRAP=mulle-bootstrap
158 155
    else
159
-      warn_scripts "${BOOTSTRAP_SUBDIR}"  || fail "Ok, aborted."
156
+      mulle-bootstrap-warn-scripts.sh "${BOOTSTRAP_SUBDIR}"  || fail "Ok, aborted."
160 157
    fi
161 158
 
162 159
    if [ "${DONT_RECURSE}" = "" ]
... ...
@@ -30,40 +30,7 @@
30 30
 #   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 31
 #   POSSIBILITY OF SUCH DAMAGE.
32 32
 
33
-private_dir_has_files()
34
-{
35
-   local empty
36
-   local result
37
-
38
-   empty=`ls "$1"/* 2> /dev/null` 2> /dev/null
39
-   [ "$empty" != "" ]
40
-   result=$?
41
-
42
-   if [ "$result" -eq 1 ]
43
-   then
44
-      log_fluff "directory \"$1\" has no files"
45
-   else
46
-      log_fluff "directory \"$1\" has files"
47
-   fi
48
-   return "$result"
49
-}
50
-
51
-
52
-private_user_say_yes()
53
-{
54
-  local  x
55
-
56
-  x=`read_config_setting "answer" "ASK"`
57
-  while [ "$x" != "Y" -a "$x" != "YES" -a "$x" != "N" -a "$x" != "NO" -a "$x" != "" ]
58
-  do
59
-     echo "${C_YELLOW}$* (${C_WHITE}y${C_YELLOW}/${C_GREEN}N${C_YELLOW})${C_RESET}" >&2
60
-     read x
61
-     x=`echo "${x}" | tr '[:lower:]' '[:upper:]'`
62
-  done
63
-
64
-  [ "$x" = "Y" -o "$x" = "YES" ]
65
-}
66
-
33
+. mulle-bootstrap-local-environment.sh
67 34
 
68 35
 warn_scripts()
69 36
 {
... ...
@@ -93,7 +60,7 @@ warn_scripts()
93 60
    then
94 61
        exekutor [ -e "$2" ] || fail "internal error, expected directory missing"
95 62
 
96
-      if private_dir_has_files "$2"
63
+      if dir_has_files "$2"
97 64
       then
98 65
          phases=`(find "$2"/* -name "project.pbxproj" -exec grep -q 'PBXShellScriptBuildPhase' '{}'  \; -print)`
99 66
          if [ ! -z "${phases}" ]
... ...
@@ -115,7 +82,7 @@ warn_scripts()
115 82
 
116 83
    if [ "$phases" != "" -o "$scripts" != "" ]
117 84
    then
118
-      private_user_say_yes "You should probably inspect them before continuing.
85
+      user_say_yes "You should probably inspect them before continuing.
119 86
 Abort now ?"
120 87
       if [ $? -eq 0 ]
121 88
       then
... ...
@@ -128,3 +95,10 @@ now."
128 95
    fi
129 96
 }
130 97
 
98
+
99
+main()
100
+{
101
+   warn_scripts "$@"
102
+}
103
+
104
+main "$@"