Browse code

rename install to systeminstall internally also, and fix

Nat! authored on 02-06-2017 15:21:22
Showing 4 changed files
... ...
@@ -11,7 +11,6 @@ SCRIPTS=install.sh \
11 11
 	src/mulle-bootstrap-functions.sh \
12 12
 	src/mulle-bootstrap-gcc.sh \
13 13
 	src/mulle-bootstrap-init.sh \
14
-	src/mulle-bootstrap-install.sh \
15 14
 	src/mulle-bootstrap-local-environment.sh \
16 15
 	src/mulle-bootstrap-logging.sh \
17 16
 	src/mulle-bootstrap-mingw.sh \
... ...
@@ -19,6 +18,7 @@ SCRIPTS=install.sh \
19 18
 	src/mulle-bootstrap-scm.sh \
20 19
 	src/mulle-bootstrap-scripts.sh \
21 20
 	src/mulle-bootstrap-settings.sh \
21
+	src/mulle-bootstrap-systeminstall.sh \
22 22
 	src/mulle-bootstrap-tag.sh \
23 23
 	src/mulle-bootstrap-warn-scripts.sh \
24 24
 	src/mulle-bootstrap-xcode.sh \
... ...
@@ -1,3 +1,7 @@
1
+## 3.6.2
2
+
3
+* fix and improve systeminstall (formerly just install)
4
+
1 5
 ## 3.6.1
2 6
 
3 7
 * bug fixes
... ...
@@ -31,7 +31,7 @@
31 31
 #
32 32
 MULLE_EXECUTABLE_VERSION_MAJOR=3
33 33
 MULLE_EXECUTABLE_VERSION_MINOR=6
34
-MULLE_EXECUTABLE_VERSION_PATCH=1
34
+MULLE_EXECUTABLE_VERSION_PATCH=2
35 35
 
36 36
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
37 37
 
... ...
@@ -555,9 +555,9 @@ bootstrap_main()
555 555
       ;;
556 556
 
557 557
       systeminstall)
558
-         . mulle-bootstrap-install.sh
558
+         . mulle-bootstrap-systeminstall.sh
559 559
 
560
-         install_main "$@" || exit 1
560
+         systeminstall_main "$@" || exit 1
561 561
       ;;
562 562
 
563 563
       show)
564 564
similarity index 89%
565 565
rename from src/mulle-bootstrap-install.sh
566 566
rename to src/mulle-bootstrap-systeminstall.sh
... ...
@@ -30,15 +30,15 @@
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 #
32 32
 
33
-MULLE_BOOTSTRAP_INSTALL_SH="included"
33
+MULLE_BOOTSTRAP_SYSTEMINSTALL_SH="included"
34 34
 
35 35
 
36 36
 
37
-install_usage()
37
+systeminstall_usage()
38 38
 {
39 39
    cat <<EOF >&2
40 40
 Usage:
41
-   ${MULLE_EXECUTABLE} install [libraryprefix] [frameworkprefix]
41
+   ${MULLE_EXECUTABLE} systeminstall [libraryprefix] [frameworkprefix]
42 42
 
43 43
    You may need to run this as sudo.
44 44
    The default libraryprefix is "${DEFAULT_PREFIX}
... ...
@@ -51,6 +51,8 @@ EOF
51 51
 
52 52
 install_libraries_with_action()
53 53
 {
54
+   log_debug "install_libraries_with_action" "$*"
55
+
54 56
    local action
55 57
    local dstdir
56 58
    local srcdir
... ...
@@ -82,7 +84,8 @@ install_libraries_with_action()
82 84
 
83 85
          log_info "Installing library ${C_MAGENTA}${C_BOLD}${library}${C_INFO} into ${dstdir}..."
84 86
          mkdir_if_missing "${dstdir}"
85
-         exekutor "$action" "`pwd`/${library}" "${dstdir}/${library}"
87
+         # don't quote action
88
+         exekutor $action "`pwd`/${library}" "${dstdir}/${library}"
86 89
          if [ -x "${dstdir}/${library}" ]
87 90
          then
88 91
             exekutor chmod 755 "${dstdir}/${library}"
... ...
@@ -97,7 +100,7 @@ install_libraries_with_action()
97 100
 
98 101
 install_libraries_by_copying()
99 102
 {
100
-   install_libraries_with_action "cp -Ra" "$@"
103
+   install_libraries_with_action "cp -Ra ${COPYMOVEFLAGS}" "$@"
101 104
 }
102 105
 
103 106
 
... ...
@@ -142,7 +145,8 @@ install_headers_with_action()
142 145
          fi
143 146
          log_info "Installing header ${C_MAGENTA}${C_BOLD}${header}${C_INFO} into \"${dstdir}\" ..."
144 147
          mkdir_if_missing "${dstdir}"
145
-         exekutor "${action}" "`pwd`/${header}" "${dstdir}/${header}"
148
+         # don't quote action
149
+         exekutor ${action} "`pwd`/${header}" "${dstdir}/${header}"
146 150
       fi
147 151
    done
148 152
 
... ...
@@ -159,7 +163,8 @@ install_headers_with_action()
159 163
          fi
160 164
          log_info "Installing headers ${C_MAGENTA}${C_BOLD}${header}${C_INFO} into \"${dstdir}\" ..."
161 165
          mkdir_if_missing "${dstdir}"
162
-         exekutor "${action}" "`pwd`/${header}" "${dstdir}/${header}"
166
+         # don't quote action
167
+         exekutor ${action} "`pwd`/${header}" "${dstdir}/${header}"
163 168
       fi
164 169
    done
165 170
 
... ...
@@ -169,13 +174,13 @@ install_headers_with_action()
169 174
 
170 175
 install_headers_by_copying()
171 176
 {
172
-   install_headers_with_action "cp -Ra" "$@"
177
+   install_headers_with_action "cp -Ra ${COPYMOVEFLAGS}" "$@"
173 178
 }
174 179
 
175 180
 
176 181
 install_headers_by_symlinking()
177 182
 {
178
-   install_headers_with_action "ln -s" "$@"
183
+   "install_headers_with_action" "ln -s" "$@"
179 184
 }
180 185
 
181 186
 
... ...
@@ -211,7 +216,7 @@ merge_framework_configurations()
211 216
       if [ ! -z "${suffix}" ]
212 217
       then
213 218
          dstexe="${dstdir}/${name}${suffix}"
214
-         exekutor cp "${srcexe}" "${dstexe}" >&2
219
+         exekutor cp ${COPYMOVEFLAGS} "${srcexe}" "${dstexe}" >&2
215 220
          exekutor chmod 755 "${dstexe}"  >&2
216 221
       fi
217 222
    done
... ...
@@ -251,7 +256,8 @@ install_frameworks_with_action()
251 256
 
252 257
          mkdir_if_missing "${dstdir}"
253 258
          log_info "Installing Framework ${C_MAGENTA}${C_BOLD}${framework}${C_INFO} into \"${dstdir}\" ..."
254
-         exekutor "${action}" "`pwd`/${framework}" "${dstdir}/${framework}"
259
+         # don't quote action
260
+         exekutor ${action} "`pwd`/${framework}" "${dstdir}/${framework}"
255 261
       fi
256 262
    done
257 263
 
... ...
@@ -276,9 +282,9 @@ install_frameworks_by_symlinking()
276 282
 # Currently only install the default configuration, which
277 283
 # is usually "Release"
278 284
 #
279
-install_main()
285
+systeminstall_main()
280 286
 {
281
-   log_debug "::: install :::"
287
+   log_debug "::: systeminstall :::"
282 288
 
283 289
    [ -z "${MULLE_BOOTSTRAP_COMMON_SETTINGS_SH}" ] && . mulle-bootstrap-common-settings.sh
284 290