Browse code

Modernized release script. Now build and install with cmake. Still contains hardcoded paths for the webserver though :-/ Improve some error messages.

Nat! authored on 12-06-2017 16:32:52 • Nat! committed on 13-06-2017 10:58:00
Showing 17 changed files
... ...
@@ -1,2 +1,3 @@
1
-https://github.com/mulle-nat/google-toolbox-for-mac
2
-https://www.mulle-kybernetik.com/repositories/mulle-configuration
1
+${MULLE_REPOSITORIES:-https://github.com/mulle-nat}/mulle-homebrew;./bin/mulle-homebrew;${MULLE_HOMEBREW_BRANCH:-release}
2
+${MULLE_REPOSITORIES:-https://github.com/mulle-nat}/mulle-configuration;;${MULLE_CONFIGURATION_BRANCH:-release}
3
+${MULLE_REPOSITORIES:-https://github.com/mulle-nat}/google-toolbox-for-mac
... ...
@@ -18,4 +18,6 @@ tests/compare-parse-speed-to-unarchive-speed.sh
18 18
 dependencies/
19 19
 .repos/
20 20
 mulle-configuration/
21
-addictions/
22 21
\ No newline at end of file
22
+addictions//.bootstrap.repos
23
+/addictions
24
+/.bootstrap.repos
... ...
@@ -12,143 +12,34 @@ else()
12 12
   include( Release)
13 13
 endif()
14 14
 
15
-# move to mulle-configuration
16
-if( CMAKE_SYSTEM_NAME MATCHES "Apple")
17
-   find_library( FOUNDATION
18
-                 NAMES Foundation
19
-                 PATHS ${CMAKE_OSX_SYSROOT}/System/Library
20
-                 PATH_SUFFIXES Frameworks
21
-                 NO_DEFAULT_PATH)
22
-endif()
23
-
24
-
25
-if( CMAKE_SYSTEM_NAME MATCHES "Linux")
26
-   find_library( FOUNDATION
27
-                 NAMES Foundation)
28
-   set( OS_SPECIFIC_LIBS
29
--lpthread
30
--ldl
31
-)
32
-endif()
33
-
15
+find_library( FOUNDATION_LIBRARY NAMES Foundation)
16
+FIND_PACKAGE( ZLIB REQUIRED)
34 17
 
35
-add_definitions( -DPROJECT_VERSION=1855)
18
+message( STATUS "FOUNDATION_LIBRARY is ${FOUNDATION_LIBRARY}")
19
+message( STATUS "ZLIB_LIBRARIES is ${ZLIB_LIBRARIES}")
36 20
 
37
-include_directories(
38
-src
39
-src/hoedown
40
-src/mongoose
41
-google-toolbox-for-mac
42
-google-toolbox-for-mac/Foundation
43
-)
44
-
45
-
46
-set( MONGOOSE_SOURCES
47
-src/mongoose/mongoose.c
48
-)
49
-
50
-
51
-set( HOEDOWN_SOURCES
52
-src/hoedown/Hoedown.m
53
-src/hoedown/Hoedown+MulleScionPrinting.m
54
-src/hoedown/NSString+TrimTextFromExamples.m
55
-src/hoedown/NSData+Hoedown.m
56
-src/hoedown/autolink.c
57
-src/hoedown/buffer.c
58
-src/hoedown/document.c
59
-src/hoedown/escape.c
60
-src/hoedown/html_blocks.c
61
-src/hoedown/html_smartypants.c
62
-src/hoedown/html.c
63
-src/hoedown/stack.c
64
-src/hoedown/version.c
65
-)
21
+add_definitions( -DPROJECT_VERSION=1856)
66 22
 
23
+include( CMakeSourcesAndHeaders.txt )
67 24
 
68 25
 set( GOOGLE_TOOLBOX_SOURCES
69
-google-toolbox-for-mac/Foundation/GTMNSString+HTML.m
70
-)
71
-
72
-
73
-
74
-# public headers
75
-set( MULLE_SCION_HEADERS
76
-src/MulleScion.h
77
-)
78
-
79
-
80
-set( MULLE_SCION_SOURCES
81
-src/MulleScion.m
82
-)
83
-
84
-
85
-# public headers
86
-set( MULLE_SCION_FOUNDATION_HEADERS
87
-src/MulleObjCCompilerSettings.h
88
-src/MulleScionObjectModel.h
89
-src/MulleScionObjectModel+NSCoding.h
90
-src/MulleScionTemplate+CompressedArchive.h
91
-src/NSFileHandle+MulleOutputFileHandle.h
92
-src/MulleScionObjectModel+TraceDescription.h
26
+"google-toolbox-for-mac/Foundation/GTMNSString+HTML.m"
93 27
 )
94 28
 
95 29
 
96
-set( MULLE_SCION_FOUNDATION_SOURCES
97
-src/MulleScionObjectModel.m
98
-src/MulleScionObjectModel+NSCoding.m
99
-src/MulleScionTemplate+CompressedArchive.m
100
-src/NSFileHandle+MulleOutputFileHandle.m
101
-src/MulleScionObjectModel+TraceDescription.m
102
-src/NSData+ZLib.m
103
-src/NSObject+KVC_Compatibility.m
104
-src/NSString+HTMLEscape.m
30
+add_library( MulleScion STATIC
31
+${MULLE_SCION_SOURCES}
32
+${MULLE_SCION_FOUNDATION_SOURCES}
33
+${MULLE_SCION_PARSER_SOURCES}
34
+${MULLE_SCION_PRINTER_SOURCES}
105 35
 ${GOOGLE_TOOLBOX_SOURCES}
106 36
 ${HOEDOWN_SOURCES}
107 37
 )
108 38
 
109 39
 
110
-# public headers
111
-set( MULLE_SCION_PARSER_HEADERS
112
-src/MulleScionParser.h
113
-src/MulleScionParser+Parsing.h
114
-)
115
-
116
-
117
-set( MULLE_SCION_PARSER_SOURCES
118
-src/MulleScionParser.m
119
-src/MulleScionParser+Parsing.m
120
-src/MulleScionObjectModel+Parsing.m
121
-src/MulleScionObjectModel+BlockExpansion.m
122
-src/MulleScionObjectModel+MacroExpansion.m
123
-)
124
-
125
-
126
-# public headers
127
-set( MULLE_SCION_PRINTER_HEADERS
128
-src/MulleScionOutputProtocol.h
129
-src/MulleScionDataSourceProtocol.h
130
-src/MulleScionPrinter.h
131
-src/MulleScionPrintingException.h
132
-src/NSObject+MulleScionDescription.h
133
-)
134
-
135
-
136
-set( MULLE_SCION_PRINTER_SOURCES
137
-src/MulleScionDataSourceProtocol.m
138
-src/MulleScionPrinter.m
139
-src/MulleScionPrintingException.m
140
-src/MulleScionObjectModel+Printing.m
141
-src/NSObject+MulleScionDescription.m
142
-src/NSValue+CheatAndHack.m
143
-src/MulleMutableLineNumber.m
144
-src/MulleScionNull.m
145
-)
146
-
147
-
148
-set( TOOL_SOURCES
149
-src/MulleMongoose.m
150
-src/MulleScionObjectModel+MulleMongoose.m
151
-src/main.m
40
+add_executable( mulle-scion
41
+${MONGOOSE_SOURCES}
42
+${TOOL_SOURCES}
152 43
 )
153 44
 
154 45
 
... ...
@@ -160,28 +51,19 @@ ${MULLE_SCION_PRINTER_HEADERS}
160 51
 )
161 52
 
162 53
 
163
-add_library( MulleScion STATIC
164
-${MULLE_SCION_SOURCES}
165
-${MULLE_SCION_FOUNDATION_SOURCES}
166
-${MULLE_SCION_PARSER_SOURCES}
167
-${MULLE_SCION_PRINTER_SOURCES}
168
-)
169
-
170
-
171
-add_executable( mulle-scion
172
-${MONGOOSE_SOURCES}
173
-${TOOL_SOURCES}
174
-)
175
-
176 54
 target_link_libraries( mulle-scion
55
+${BEGIN_ALL_LOAD}
177 56
 MulleScion
178
-"${FOUNDATION}"
57
+${DEPENDENCY_LIBRARIES}
58
+${FOUNDATION_LIBRARY}
59
+${ZLIB_LIBRARIES}
60
+${END_ALL_LOAD}
179 61
 ${OS_SPECIFIC_LIBS}
180 62
 )
181 63
 
182 64
 
183
-
184
-INSTALL( TARGETS MulleScion DESTINATION "lib")
185
-INSTALL( FILES ${HEADERS} DESTINATION "include/MulleScion")
186
-
65
+# INSTALL( TARGETS MulleScion DESTINATION "lib")
66
+# INSTALL( FILES ${HEADERS} DESTINATION "include/MulleScion")
187 67
 INSTALL( TARGETS mulle-scion DESTINATION "bin")
68
+INSTALL( FILES ${SCIONS} DESTINATION "share/mulle-scion/dox")
69
+
188 70
new file mode 100644
... ...
@@ -0,0 +1,146 @@
1
+include_directories(
2
+src
3
+src/hoedown
4
+src/mongoose
5
+google-toolbox-for-mac
6
+google-toolbox-for-mac/Foundation
7
+)
8
+
9
+
10
+set( MONGOOSE_SOURCES
11
+src/mongoose/mongoose.c
12
+)
13
+
14
+
15
+set( HOEDOWN_SOURCES
16
+src/hoedown/Hoedown.m
17
+src/hoedown/Hoedown+MulleScionPrinting.m
18
+src/hoedown/NSString+TrimTextFromExamples.m
19
+src/hoedown/NSData+Hoedown.m
20
+src/hoedown/autolink.c
21
+src/hoedown/buffer.c
22
+src/hoedown/document.c
23
+src/hoedown/escape.c
24
+src/hoedown/html_blocks.c
25
+src/hoedown/html_smartypants.c
26
+src/hoedown/html.c
27
+src/hoedown/stack.c
28
+src/hoedown/version.c
29
+)
30
+
31
+# public headers
32
+set( MULLE_SCION_HEADERS
33
+src/MulleScion.h
34
+)
35
+
36
+
37
+set( MULLE_SCION_SOURCES
38
+src/MulleScion.m
39
+)
40
+
41
+
42
+# public headers
43
+set( MULLE_SCION_FOUNDATION_HEADERS
44
+src/MulleObjCCompilerSettings.h
45
+src/MulleScionObjectModel.h
46
+src/MulleScionObjectModel+NSCoding.h
47
+src/MulleScionTemplate+CompressedArchive.h
48
+src/NSFileHandle+MulleOutputFileHandle.h
49
+src/MulleScionObjectModel+TraceDescription.h
50
+)
51
+
52
+
53
+set( MULLE_SCION_FOUNDATION_SOURCES
54
+src/MulleScionObjectModel.m
55
+src/MulleScionObjectModel+NSCoding.m
56
+src/MulleScionTemplate+CompressedArchive.m
57
+src/NSFileHandle+MulleOutputFileHandle.m
58
+src/MulleScionObjectModel+TraceDescription.m
59
+src/NSData+ZLib.m
60
+src/NSObject+KVC_Compatibility.m
61
+src/NSString+HTMLEscape.m
62
+)
63
+
64
+
65
+# public headers
66
+set( MULLE_SCION_PARSER_HEADERS
67
+src/MulleScionParser.h
68
+src/MulleScionParser+Parsing.h
69
+)
70
+
71
+
72
+set( MULLE_SCION_PARSER_SOURCES
73
+src/MulleScionParser.m
74
+src/MulleScionParser+Parsing.m
75
+src/MulleScionObjectModel+Parsing.m
76
+src/MulleScionObjectModel+BlockExpansion.m
77
+src/MulleScionObjectModel+MacroExpansion.m
78
+)
79
+
80
+
81
+# public headers
82
+set( MULLE_SCION_PRINTER_HEADERS
83
+src/MulleScionOutputProtocol.h
84
+src/MulleScionDataSourceProtocol.h
85
+src/MulleScionPrinter.h
86
+src/MulleScionPrintingException.h
87
+src/NSObject+MulleScionDescription.h
88
+)
89
+
90
+
91
+set( MULLE_SCION_PRINTER_SOURCES
92
+src/MulleScionDataSourceProtocol.m
93
+src/MulleScionPrinter.m
94
+src/MulleScionPrintingException.m
95
+src/MulleScionObjectModel+Printing.m
96
+src/NSObject+MulleScionDescription.m
97
+src/NSValue+CheatAndHack.m
98
+src/MulleMutableLineNumber.m
99
+src/MulleScionNull.m
100
+)
101
+
102
+
103
+set( TOOL_SOURCES
104
+src/MulleMongoose.m
105
+src/MulleScionObjectModel+MulleMongoose.m
106
+src/main.m
107
+)
108
+
109
+
110
+set( SCIONS
111
+dox/Environment_Variables.scion
112
+dox/Formatting_Options.scion
113
+dox/Global_Variables.scion
114
+dox/NSMakeRange.scion
115
+dox/__demo.scion
116
+dox/__page.scion
117
+dox/__scion_banner.scion
118
+dox/__scion_footer.scion
119
+dox/__scion_macros.scion
120
+dox/__scion_navigation.scion
121
+dox/__scion_page.scion
122
+dox/__scion_style.scion
123
+dox/_spaces.scion
124
+dox/_wrapper.scion
125
+dox/block.scion
126
+dox/define.scion
127
+dox/dot.scion
128
+dox/extends.scion
129
+dox/filter.scion
130
+dox/for.scion
131
+dox/if.scion
132
+dox/includes.scion
133
+dox/index.scion
134
+dox/log.scion
135
+dox/macro.scion
136
+dox/requires.scion
137
+dox/self.scion
138
+dox/set.scion
139
+dox/verbatim.scion
140
+dox/while.scion
141
+"dox/[].scion"
142
+"dox/|.scion"
143
+"dox/!_Introduction.scion"
144
+"dox/#!.scion"
145
+)
146
+
... ...
@@ -1,10 +1,9 @@
1
-## 1857
2
-
3
-* clarify usage
4
- 
5 1
 ## 1856
6 2
 
3
+* clarify usage output
7 4
 * add nexti/previ to for loop dictionary.
5
+* modernized tests a little bit to be compatible with mulle-tests also improved
6
+CmakeLists.txt slightly
8 7
 
9 8
 ## 1855
10 9
 
11 10
new file mode 100755
... ...
@@ -0,0 +1,35 @@
1
+# -- Formula Info --
2
+# If you don't have this file, there will be no homebrew
3
+# formula operations.
4
+#
5
+PROJECT="MulleScion"   # your project name, requires camel-case
6
+DESC="A modern template engine for Objective C"
7
+LANGUAGE="objc"        # c,cpp, objc, bash ...
8
+
9
+
10
+#
11
+# Specify needed homebrew packages by name as you would when saying
12
+# `brew install`.
13
+#
14
+# Use the ${DEPENDENCY_TAP} prefix for non-official dependencies.
15
+# DEPENDENCIES and BUILD_DEPENDENCIES will be evaled later! 
16
+# So keep them single quoted.
17
+#
18
+# DEPENDENCIES='${DEPENDENCY_TAP}mulle-concurrent
19
+# libpng
20
+# '
21
+
22
+#
23
+# Build via mulle-build. If you don't like this
24
+# edit bin/release.sh
25
+#
26
+BUILD_DEPENDENCIES='${BOOTSTRAP_TAP}mulle-build
27
+cmake'
28
+
29
+
30
+# Uncomment this if you don't want to push the formula
31
+# OPTION_NO_TAP_PUSH="YES"
32
+
33
+# Often it's more flexible to pass these via parameters
34
+# PUBLISHER="mulle-nat"
35
+# PUBLISHER_TAP="mulle-kybernetik/software/"
0 36
new file mode 100755
... ...
@@ -0,0 +1,8 @@
1
+# -- Version Info --
2
+#
3
+# Keep these commented out, if the automatic detection works well
4
+# enough for you. If you don't have this file, there will be 
5
+# not git operations. 
6
+#
7
+VERSIONFILE=MulleScion.xcodeproj/project.pbxproj
8
+VERSIONNAME=CURRENT_PROJECT_VERSION
0 9
new file mode 100755
... ...
@@ -0,0 +1,162 @@
1
+#! /usr/bin/env bash
2
+#
3
+#   Copyright (c) 2017 Nat! - Mulle kybernetiK
4
+#   All rights reserved.
5
+#
6
+#   Redistribution and use in source and binary forms, with or without
7
+#   modification, are permitted provided that the following conditions are met:
8
+#
9
+#   Redistributions of source code must retain the above copyright notice, this
10
+#   list of conditions and the following disclaimer.
11
+#
12
+#   Redistributions in binary form must reproduce the above copyright notice,
13
+#   this list of conditions and the following disclaimer in the documentation
14
+#   and/or other materials provided with the distribution.
15
+#
16
+#   Neither the name of Mulle kybernetiK nor the names of its contributors
17
+#   may be used to endorse or promote products derived from this software
18
+#   without specific prior written permission.
19
+#
20
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
+#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
+#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
+#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
+#   POSSIBILITY OF SUCH DAMAGE.
31
+#
32
+#
33
+# For documentation and help see:
34
+#    https://github.com/mulle-nat/mulle-homebrew
35
+#
36
+# Run this somewhat like this (for real: remove -n):
37
+#   ./bin/release.sh -v -n --publisher mulle-nat --publisher-tap mulle-kybernetik/software/
38
+#
39
+
40
+EXE_DIR="`dirname -- $0`"
41
+
42
+# if there is a release-info.sh file read it
43
+if [ -f "${EXE_DIR}/release-info.sh" ]
44
+then
45
+   DO_GIT_RELEASE="YES"
46
+   . "${EXE_DIR}/release-info.sh"
47
+fi
48
+
49
+# if there is a formula-info.sh file read it
50
+if [ -f "${EXE_DIR}/formula-info.sh" ]
51
+then
52
+   DO_GENERATE_FORMULA="YES"
53
+   . "${EXE_DIR}/formula-info.sh"
54
+fi
55
+
56
+#
57
+# If there is a - possibly .gitignored - tap-info.sh file read it.
58
+# It could store PUBLISHER and PUBLISHER_TAP
59
+#
60
+if [ -f "${EXE_DIR}/tap-info.sh" ]
61
+then
62
+   . "${EXE_DIR}/tap-info.sh"
63
+fi
64
+
65
+
66
+#######
67
+# If you are using mulle-build, you don't hafta change anything after this
68
+#######
69
+
70
+#
71
+# Generate your `def install` `test do` lines here. echo them to stdout.
72
+#
73
+generate_brew_formula_build()
74
+{
75
+   local project="$1"
76
+   local name="$2"
77
+   local version="$3"
78
+
79
+   generate_brew_formula_mulle_build "${project}" "${name}" "${version}"
80
+   generate_brew_formula_mulle_test  "${project}" "${name}" "${version}"
81
+}
82
+
83
+
84
+#
85
+# If you are unhappy with the formula in general, then change
86
+# this function. Print your formula to stdout.
87
+#
88
+generate_brew_formula()
89
+{
90
+#   local project="$1"
91
+#   local name="$2"
92
+#   local version="$3"
93
+#   local dependencies="$4"
94
+#   local builddependencies="$5"
95
+#   local homepage="$6"
96
+#   local desc="$7"
97
+#   local archiveurl="$8"
98
+
99
+   _generate_brew_formula "$@"
100
+}
101
+
102
+#######
103
+# Ideally changes to the following values are done with the command line
104
+# which makes it easier for forks.
105
+#######
106
+
107
+MULLE_BOOTSTRAP_FAIL_PREFIX="`basename -- $0`"
108
+MULLE_HOMEBREW_VERSION="4.0.0"
109
+
110
+#
111
+# prefer local mulle-homebrew if available
112
+# Do not embed it anymore!
113
+#
114
+if [ -z "`command -v mulle-homebrew-env`" ]
115
+then
116
+   cat <<EOF >&2
117
+mulle-homebrew-env not found in PATH.
118
+Visit the homepage for installation instructions:
119
+   https://github.com/mulle-nat/mulle-homebrew
120
+EOF
121
+   exit 1
122
+fi
123
+
124
+INSTALLED_MULLE_HOMEBREW_VERSION="`mulle-homebrew-env version`" || exit 1
125
+LIBEXEC_DIR="`mulle-homebrew-env libexec-path`" || exit 1
126
+
127
+. "${LIBEXEC_DIR}/mulle-homebrew.sh"    || exit 1
128
+. "${LIBEXEC_DIR}/mulle-git.sh"         || exit 1
129
+. "${LIBEXEC_DIR}/mulle-version.sh"     || exit 1
130
+. "${LIBEXEC_DIR}/mulle-environment.sh" || exit 1
131
+
132
+
133
+main()
134
+{
135
+   if [ "${DO_GIT_RELEASE}" != "YES" -a "${DO_GENERATE_FORMULA}" != "YES" ]
136
+   then
137
+      fail "Nothing to do. release-info.sh and formula-info.sh are missing"
138
+   fi
139
+
140
+   if [ "${DO_GIT_RELEASE}" = "YES" ]
141
+   then
142
+     # do the release
143
+      git_main "${BRANCH}" "${ORIGIN}" "${TAG}" "${GITHUB}" || exit 1
144
+   fi
145
+
146
+   if [ "${DO_GENERATE_FORMULA}" = "YES" ]
147
+   then
148
+      # generate the formula and push it
149
+      homebrew_main "${PROJECT}" \
150
+                    "${NAME}" \
151
+                    "${VERSION}" \
152
+                    "${DEPENDENCIES}" \
153
+                    "${BUILD_DEPENDENCIES}" \
154
+                    "${HOMEPAGE_URL}" \
155
+                    "${DESC}" \
156
+                    "${ARCHIVE_URL}" \
157
+                    "${HOMEBREW_TAP}" \
158
+                    "${RBFILE}"
159
+   fi
160
+}
161
+
162
+main "$@"
0 163
new file mode 100644
... ...
@@ -0,0 +1,4 @@
1
+PUBLISHER="mulle-nat"
2
+PUBLISHER_FULLNAME="Mulle kybernetiK"
3
+PUBLISHER_TAP="mulle-kybernetik/software"
4
+
0 5
deleted file mode 100755
... ...
@@ -1,80 +0,0 @@
1
-#! /bin/sh -x
2
-#
3
-# Generate a formula for mulle-scion stand alone
4
-#
5
-PROJECT=MulleScion
6
-TARGET=mulle-scion
7
-
8
-HOMEPAGE="https://www.mulle-kybernetik.com/software/git/${PROJECT}"
9
-DESC="Templating Engine in Objective-C"
10
-
11
-VERSION="$1"
12
-[ $# -eq 0 ] || shift
13
-ARCHIVEURL="${1:-https://www.mulle-kybernetik.com/software/git/${PROJECT}/tarball/$VERSION}"
14
-[ $# -eq 0 ] || shift
15
-CURLOPTIONS="-s -L"  # -k broken on OS X
16
-
17
-usage()
18
-{
19
-   echo "generate-brew-formula.sh VERSION ARCHIVEURL" >&2
20
-   exit 1
21
-}
22
-
23
-
24
-[ ! -z "$VERSION"     ] || usage
25
-[ ! -z "$ARCHIVEURL"  ] || usage
26
-
27
-
28
-TMPARCHIVE="/tmp/${PROJECT}-${VERSION}-archive"
29
-
30
-if [ ! -f "${TMPARCHIVE}" ]
31
-then
32
-   curl ${CURLOPTIONS} -o "${TMPARCHIVE}" "${ARCHIVEURL}"
33
-   if [ $? -ne 0 -o ! -f "${TMPARCHIVE}" ]
34
-   then
35
-      echo "Download failed" >&2
36
-      exit 1
37
-   fi
38
-else
39
-   echo "using cached file ${TMPARCHIVE} instead of downloading again" >&2
40
-fi
41
-
42
-#
43
-# anything less than 17 KB is wrong
44
-#
45
-size="`du -k "${TMPARCHIVE}" | awk '{ print $ 1}'`"
46
-if [ $size -lt 17 ]
47
-then
48
-   echo "Archive truncated or missing" >&2
49
-   cat "${TMPARCHIVE}" >&2
50
-   rm "${TMPARCHIVE}"
51
-   exit 1
52
-fi
53
-
54
-HASH="`shasum -p -a 256 "${TMPARCHIVE}" | awk '{ print $1 }'`"
55
-
56
-cat <<EOF
57
-class ${PROJECT} < Formula
58
-  homepage "${HOMEPAGE}"
59
-  desc "${DESC}"
60
-  url "${ARCHIVEURL}"
61
-  version "${VERSION}"
62
-  sha256 "${HASH}"
63
-
64
-  depends_on "mulle-bootstrap"
65
-  depends_on :xcode => :build
66
-  depends_on :macos => :snow_leopard
67
-
68
-#  depends_on "zlib"
69
-  def install
70
-     system "mulle-bootstrap"
71
-     xcodebuild, "install", "-target", "${TARGET}", "DSTROOT=/", "INSTALL_PATH=#{bin}"
72
-  end
73
-
74
-  test do
75
-    system pwd
76
-    system "(", "cd tests", ";", "./run-all-scion-tests.sh", "#{bin}/${TARGET}", ")"
77
-  end
78
-end
79
-# FORMULA ${TARGET}.rb
80
-EOF
81 0
deleted file mode 100755
... ...
@@ -1,6 +0,0 @@
1
-#! /bin/sh
2
-
3
-TARGET=${1:-"OSX"}
4
-shift
5
-
6
-xcodebuild -target "${TARGET}" "DEPLOYMENT_LOCATION=YES", "DSTROOT=/"
7 0
deleted file mode 100755
... ...
@@ -1,59 +0,0 @@
1
-#! /bin/sh
2
-
3
-
4
-get_version()
5
-{
6
-   if [ -x "./build/Products/Debug/mulle-scion" ]
7
-   then
8
-     ./build/Products/Debug/mulle-scion --version
9
-   fi
10
-}
11
-
12
-
13
-PROJECT="mulle-scion"
14
-TAG="${1:-`get_version`}"
15
-
16
-[ -z "${TAG}" ] && exit 1
17
-
18
-
19
-
20
-git_must_be_clean()
21
-{
22
-   local name
23
-   local clean
24
-
25
-   name="${1:-${PWD}}"
26
-
27
-   if [ ! -d .git ]
28
-   then
29
-      echo "\"${name}\" is not a git repository" >&2
30
-      exit 1
31
-   fi
32
-
33
-   clean=`git status -s`
34
-   if [ "${clean}" != "" ]
35
-   then
36
-      echo "repository \"${name}\" is tainted" >&2
37
-      exit 1
38
-   fi
39
-}
40
-
41
-
42
-set -e
43
-
44
-git_must_be_clean
45
-git push public master
46
-
47
-# seperate step, as it's tedious to remove tag when
48
-# previous push fails
49
-
50
-git tag "${TAG}"
51
-git push public master --tags
52
-
53
-./generate-brew-formula.sh "${VERSION}" > "../homebrew-software/${PROJECT}.rb"
54
-(
55
-	cd ../homebrew-software ; \
56
- 	git commit -m "${TAG} release of ${PROJECT}" "${PROJECT}.rb" ; \
57
- 	git push origin master
58
-)
59
-
... ...
@@ -235,8 +235,9 @@ void    _mulle_mongoose_main( void *datasource, char **options)
235 235
 
236 236
    start_mongoose( datasource, options);
237 237
 
238
-   NSLog( @"%s started on port(s) %s",
239
-          server_name, mg_get_option(ctx, "listening_ports"));
238
+   NSLog( @"%s started on port(s) %s with document root \"%s\"",
239
+          server_name, mg_get_option(ctx, "listening_ports"),
240
+          mg_get_option( ctx, "document_root"));
240 241
 
241 242
    while( exit_flag == 0)
242 243
       sleep( 1);
... ...
@@ -116,7 +116,8 @@
116 116
    data = [NSData dataWithContentsOfMappedFile:path];
117 117
    if( ! data)
118 118
    {
119
-      NSLog( @"Could not open template file \"%@\"", path);
119
+      NSLog( @"Could not open template file \"%@\" (%@)", path,
120
+               [[NSFileManager defaultManager] currentDirectoryPath]);
120 121
       return( nil);
121 122
    }
122 123
    
... ...
@@ -288,7 +288,10 @@ static id   acquirePropertyListOrDataSourceFromBundle( NSString *s)
288 288
                                                       format:NULL
289 289
                                             errorDescription:&error];
290 290
    if( ! plist)
291
-      NSLog( @"property list failure: %@", error);
291
+   {
292
+      NSLog( @"property list failure for \"%@\": %@", s, error);
293
+      exit( 1);
294
+   }
292 295
 
293 296
    return( plist);
294 297
 }
... ...
@@ -441,7 +444,11 @@ static int   _archive_main( int argc, const char * argv[], int keyed)
441 444
 
442 445
  static char    *default_options[] =
443 446
 {
444
-   "document_root",   "/tmp/MulleScionDox",
447
+#ifndef DEBUG
448
+   "document_root", "/usr/local/share/mulle-scion/dox",
449
+#else
450
+   "document_root", "/Volumes/Source/srcM/MulleScion/dox",
451
+#endif
445 452
    "listening_ports", "127.0.0.1:18048",
446 453
    "num_threads", "1",
447 454
    "index_files", "index.scion,index.html,index.htm,index.cgi,index.shtml,index.php,index.lp",
... ...
@@ -466,7 +473,11 @@ static int   main_www( int argc, const char * argv[])
466 473
    if( s)
467 474
       default_options[ 3] = s;
468 475
 
469
-   path = @"/tmp/MulleScionDox/properties.plist";
476
+#ifndef DEBUG
477
+   path = @"/usr/local/share/mulle-scion/dox/properties.plist";
478
+#else
479
+   path = @"/Volumes/Source/srcM/MulleScion/dox/properties.plist";
480
+#endif
470 481
    s = getenv( "MulleScionServerPlist");
471 482
    if( s)
472 483
       path = [NSString stringWithCString:s];
473 484
deleted file mode 120000
... ...
@@ -1 +0,0 @@
1
-run-test.sh
2 0
\ No newline at end of file
... ...
@@ -15,19 +15,37 @@ set -m
15 15
 executable=`basename $0`
16 16
 executable=`basename $executable .sh`
17 17
 
18
-if [ "$executable" = "run-all-tests" ]
19
-then
20
-   TEST=""
21
-   VERBOSE=yes
22
-   if [ "$1" = "-q" ]
23
-   then
24
-      VERBOSE=no
25
-      shift
26
-   fi
27
-else
28
-   TEST="$1"
18
+
19
+VERBOSE="YES"
20
+
21
+while [ $# -ne 0 ]
22
+do
23
+   case "$1" in
24
+      -v)
25
+         VERBOSE="YES"
26
+      ;;
27
+
28
+      -q)
29
+         VERBOSE="NO"
30
+      ;;
31
+
32
+      --path-prefix)
33
+         shift # ignore argument
34
+      ;;
35
+      -*)
36
+         echo "unknown option $1" >&2
37
+         exit 1
38
+      ;;
39
+
40
+      *)
41
+         break
42
+      ;;
43
+   esac
29 44
    shift
30
-fi
45
+done
46
+
47
+TEST="$1"
48
+shift
31 49
 
32 50
 trace_ignore()
33 51
 {
... ...
@@ -38,30 +56,18 @@ trap trace_ignore 5 6
38 56
 
39 57
 
40 58
 # parse optional parameters
41
-exe=`ls -1 ../?uild/Products/*/mulle-scion 2> /dev/null | tail -1`
42
-if [ ! -x "${exe}" ]
43
-then
44
-   exe=`ls -1 ../?uild/*/mulle-scion | tail -1 2> /dev/null`
45
-fi
46
-
47
-if [ -x "${exe}" ]
48
-then
49
-   MULLE_SCION="${1:-${exe}}"
50
-else
51
-   MULLE_SCION=${1:-`which mulle-scion`}
52
-fi
53
-shift
59
+MULLE_SCION=`ls -1 "${PWD}/../build/mulle-scion" | tail -1 2> /dev/null`
54 60
 
55 61
 if [ -z "${MULLE_SCION}" ]
56 62
 then
57
-   echo "mulle-scion can not be found" >&2
63
+   echo "mulle-scion can not be found ($PWD)" >&2
58 64
    exit 1
59 65
 fi
60 66
 
61
-DIR=${1:-`pwd`}
67
+DIR=`pwd`
62 68
 shift
63 69
 
64
-HAVE_WARNED="no"
70
+HAVE_WARNED="NO"
65 71
 RUNS=0
66 72
 
67 73
 search_plist()
... ...
@@ -128,9 +134,9 @@ run()
128 134
 
129 135
    pwd=`pwd`
130 136
    pretty_template=`relpath "$pwd"/"$template" "$root"`
131
-   if [ "$VERBOSE" = "yes" ]
137
+   if [ "$VERBOSE" = "YES" ]
132 138
    then
133
-      echo "$pretty_template"
139
+      echo "$pretty_template" >&2
134 140
    fi
135 141
 
136 142
    RUNS=`expr $RUNS + 1`
... ...
@@ -246,10 +252,10 @@ run_test()
246 252
       if [ "$plist" = "" ]
247 253
       then
248 254
          plist="none"
249
-         if [ "$HAVE_WARNED" != "yes" ]
255
+         if [ "$HAVE_WARNED" != "YES" ]
250 256
          then
251 257
             echo "warning: no default.plist found" >&2
252
-            HAVE_WARNED="yes"
258
+            HAVE_WARNED="YES"
253 259
          fi
254 260
       fi
255 261
    fi
... ...
@@ -344,7 +350,7 @@ test_binary()
344 350
 
345 351
    if [ $code -eq 127 ]
346 352
    then
347
-      echo "mulle-scion can not be found" >&2
353
+      echo "$MULLE_SCION not in path ($PWD, $PATH)" >&2
348 354
       exit 1
349 355
    fi
350 356