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
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 160
 )
161 161
 
162 162
 
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 163
 target_link_libraries( mulle-scion
164
+${BEGIN_ALL_LOAD}
177 165
 MulleScion
178
-"${FOUNDATION}"
166
+${DEPENDENCY_LIBRARIES}
167
+${FOUNDATION_LIBRARY}
168
+${ZLIB_LIBRARIES}
169
+${END_ALL_LOAD}
179 170
 ${OS_SPECIFIC_LIBS}
180 171
 )
181 172
 
182 173
 
183
-
184
-INSTALL( TARGETS MulleScion DESTINATION "lib")
185
-INSTALL( FILES ${HEADERS} DESTINATION "include/MulleScion")
186
-
174
+# INSTALL( TARGETS MulleScion DESTINATION "lib")
175
+# INSTALL( FILES ${HEADERS} DESTINATION "include/MulleScion")
187 176
 INSTALL( TARGETS mulle-scion DESTINATION "bin")
177
+INSTALL( FILES ${SCIONS} DESTINATION "share/mulle-scion/dox")
178
+
188 179
new file mode 100644
... ...
@@ -0,0 +1,146 @@
0
+include_directories(
1
+src
2
+src/hoedown
3
+src/mongoose
4
+google-toolbox-for-mac
5
+google-toolbox-for-mac/Foundation
6
+)
7
+
8
+
9
+set( MONGOOSE_SOURCES
10
+src/mongoose/mongoose.c
11
+)
12
+
13
+
14
+set( HOEDOWN_SOURCES
15
+src/hoedown/Hoedown.m
16
+src/hoedown/Hoedown+MulleScionPrinting.m
17
+src/hoedown/NSString+TrimTextFromExamples.m
18
+src/hoedown/NSData+Hoedown.m
19
+src/hoedown/autolink.c
20
+src/hoedown/buffer.c
21
+src/hoedown/document.c
22
+src/hoedown/escape.c
23
+src/hoedown/html_blocks.c
24
+src/hoedown/html_smartypants.c
25
+src/hoedown/html.c
26
+src/hoedown/stack.c
27
+src/hoedown/version.c
28
+)
29
+
30
+# public headers
31
+set( MULLE_SCION_HEADERS
32
+src/MulleScion.h
33
+)
34
+
35
+
36
+set( MULLE_SCION_SOURCES
37
+src/MulleScion.m
38
+)
39
+
40
+
41
+# public headers
42
+set( MULLE_SCION_FOUNDATION_HEADERS
43
+src/MulleObjCCompilerSettings.h
44
+src/MulleScionObjectModel.h
45
+src/MulleScionObjectModel+NSCoding.h
46
+src/MulleScionTemplate+CompressedArchive.h
47
+src/NSFileHandle+MulleOutputFileHandle.h
48
+src/MulleScionObjectModel+TraceDescription.h
49
+)
50
+
51
+
52
+set( MULLE_SCION_FOUNDATION_SOURCES
53
+src/MulleScionObjectModel.m
54
+src/MulleScionObjectModel+NSCoding.m
55
+src/MulleScionTemplate+CompressedArchive.m
56
+src/NSFileHandle+MulleOutputFileHandle.m
57
+src/MulleScionObjectModel+TraceDescription.m
58
+src/NSData+ZLib.m
59
+src/NSObject+KVC_Compatibility.m
60
+src/NSString+HTMLEscape.m
61
+)
62
+
63
+
64
+# public headers
65
+set( MULLE_SCION_PARSER_HEADERS
66
+src/MulleScionParser.h
67
+src/MulleScionParser+Parsing.h
68
+)
69
+
70
+
71
+set( MULLE_SCION_PARSER_SOURCES
72
+src/MulleScionParser.m
73
+src/MulleScionParser+Parsing.m
74
+src/MulleScionObjectModel+Parsing.m
75
+src/MulleScionObjectModel+BlockExpansion.m
76
+src/MulleScionObjectModel+MacroExpansion.m
77
+)
78
+
79
+
80
+# public headers
81
+set( MULLE_SCION_PRINTER_HEADERS
82
+src/MulleScionOutputProtocol.h
83
+src/MulleScionDataSourceProtocol.h
84
+src/MulleScionPrinter.h
85
+src/MulleScionPrintingException.h
86
+src/NSObject+MulleScionDescription.h
87
+)
88
+
89
+
90
+set( MULLE_SCION_PRINTER_SOURCES
91
+src/MulleScionDataSourceProtocol.m
92
+src/MulleScionPrinter.m
93
+src/MulleScionPrintingException.m
94
+src/MulleScionObjectModel+Printing.m
95
+src/NSObject+MulleScionDescription.m
96
+src/NSValue+CheatAndHack.m
97
+src/MulleMutableLineNumber.m
98
+src/MulleScionNull.m
99
+)
100
+
101
+
102
+set( TOOL_SOURCES
103
+src/MulleMongoose.m
104
+src/MulleScionObjectModel+MulleMongoose.m
105
+src/main.m
106
+)
107
+
108
+
109
+set( SCIONS
110
+dox/Environment_Variables.scion
111
+dox/Formatting_Options.scion
112
+dox/Global_Variables.scion
113
+dox/NSMakeRange.scion
114
+dox/__demo.scion
115
+dox/__page.scion
116
+dox/__scion_banner.scion
117
+dox/__scion_footer.scion
118
+dox/__scion_macros.scion
119
+dox/__scion_navigation.scion
120
+dox/__scion_page.scion
121
+dox/__scion_style.scion
122
+dox/_spaces.scion
123
+dox/_wrapper.scion
124
+dox/block.scion
125
+dox/define.scion
126
+dox/dot.scion
127
+dox/extends.scion
128
+dox/filter.scion
129
+dox/for.scion
130
+dox/if.scion
131
+dox/includes.scion
132
+dox/index.scion
133
+dox/log.scion
134
+dox/macro.scion
135
+dox/requires.scion
136
+dox/self.scion
137
+dox/set.scion
138
+dox/verbatim.scion
139
+dox/while.scion
140
+"dox/[].scion"
141
+"dox/|.scion"
142
+"dox/!_Introduction.scion"
143
+"dox/#!.scion"
144
+)
145
+
... ...
@@ -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 @@
0
+# -- Formula Info --
1
+# If you don't have this file, there will be no homebrew
2
+# formula operations.
3
+#
4
+PROJECT="MulleScion"   # your project name, requires camel-case
5
+DESC="A modern template engine for Objective C"
6
+LANGUAGE="objc"        # c,cpp, objc, bash ...
7
+
8
+
9
+#
10
+# Specify needed homebrew packages by name as you would when saying
11
+# `brew install`.
12
+#
13
+# Use the ${DEPENDENCY_TAP} prefix for non-official dependencies.
14
+# DEPENDENCIES and BUILD_DEPENDENCIES will be evaled later! 
15
+# So keep them single quoted.
16
+#
17
+# DEPENDENCIES='${DEPENDENCY_TAP}mulle-concurrent
18
+# libpng
19
+# '
20
+
21
+#
22
+# Build via mulle-build. If you don't like this
23
+# edit bin/release.sh
24
+#
25
+BUILD_DEPENDENCIES='${BOOTSTRAP_TAP}mulle-build
26
+cmake'
27
+
28
+
29
+# Uncomment this if you don't want to push the formula
30
+# OPTION_NO_TAP_PUSH="YES"
31
+
32
+# Often it's more flexible to pass these via parameters
33
+# PUBLISHER="mulle-nat"
34
+# PUBLISHER_TAP="mulle-kybernetik/software/"
0 35
new file mode 100755
... ...
@@ -0,0 +1,8 @@
0
+# -- Version Info --
1
+#
2
+# Keep these commented out, if the automatic detection works well
3
+# enough for you. If you don't have this file, there will be 
4
+# not git operations. 
5
+#
6
+VERSIONFILE=MulleScion.xcodeproj/project.pbxproj
7
+VERSIONNAME=CURRENT_PROJECT_VERSION
0 8
new file mode 100755
... ...
@@ -0,0 +1,162 @@
0
+#! /usr/bin/env bash
1
+#
2
+#   Copyright (c) 2017 Nat! - Mulle kybernetiK
3
+#   All rights reserved.
4
+#
5
+#   Redistribution and use in source and binary forms, with or without
6
+#   modification, are permitted provided that the following conditions are met:
7
+#
8
+#   Redistributions of source code must retain the above copyright notice, this
9
+#   list of conditions and the following disclaimer.
10
+#
11
+#   Redistributions in binary form must reproduce the above copyright notice,
12
+#   this list of conditions and the following disclaimer in the documentation
13
+#   and/or other materials provided with the distribution.
14
+#
15
+#   Neither the name of Mulle kybernetiK nor the names of its contributors
16
+#   may be used to endorse or promote products derived from this software
17
+#   without specific prior written permission.
18
+#
19
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
+#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+#   POSSIBILITY OF SUCH DAMAGE.
30
+#
31
+#
32
+# For documentation and help see:
33
+#    https://github.com/mulle-nat/mulle-homebrew
34
+#
35
+# Run this somewhat like this (for real: remove -n):
36
+#   ./bin/release.sh -v -n --publisher mulle-nat --publisher-tap mulle-kybernetik/software/
37
+#
38
+
39
+EXE_DIR="`dirname -- $0`"
40
+
41
+# if there is a release-info.sh file read it
42
+if [ -f "${EXE_DIR}/release-info.sh" ]
43
+then
44
+   DO_GIT_RELEASE="YES"
45
+   . "${EXE_DIR}/release-info.sh"
46
+fi
47
+
48
+# if there is a formula-info.sh file read it
49
+if [ -f "${EXE_DIR}/formula-info.sh" ]
50
+then
51
+   DO_GENERATE_FORMULA="YES"
52
+   . "${EXE_DIR}/formula-info.sh"
53
+fi
54
+
55
+#
56
+# If there is a - possibly .gitignored - tap-info.sh file read it.
57
+# It could store PUBLISHER and PUBLISHER_TAP
58
+#
59
+if [ -f "${EXE_DIR}/tap-info.sh" ]
60
+then
61
+   . "${EXE_DIR}/tap-info.sh"
62
+fi
63
+
64
+
65
+#######
66
+# If you are using mulle-build, you don't hafta change anything after this
67
+#######
68
+
69
+#
70
+# Generate your `def install` `test do` lines here. echo them to stdout.
71
+#
72
+generate_brew_formula_build()
73
+{
74
+   local project="$1"
75
+   local name="$2"
76
+   local version="$3"
77
+
78
+   generate_brew_formula_mulle_build "${project}" "${name}" "${version}"
79
+   generate_brew_formula_mulle_test  "${project}" "${name}" "${version}"
80
+}
81
+
82
+
83
+#
84
+# If you are unhappy with the formula in general, then change
85
+# this function. Print your formula to stdout.
86
+#
87
+generate_brew_formula()
88
+{
89
+#   local project="$1"
90
+#   local name="$2"
91
+#   local version="$3"
92
+#   local dependencies="$4"
93
+#   local builddependencies="$5"
94
+#   local homepage="$6"
95
+#   local desc="$7"
96
+#   local archiveurl="$8"
97
+
98
+   _generate_brew_formula "$@"
99
+}
100
+
101
+#######
102
+# Ideally changes to the following values are done with the command line
103
+# which makes it easier for forks.
104
+#######
105
+
106
+MULLE_BOOTSTRAP_FAIL_PREFIX="`basename -- $0`"
107
+MULLE_HOMEBREW_VERSION="4.0.0"
108
+
109
+#
110
+# prefer local mulle-homebrew if available
111
+# Do not embed it anymore!
112
+#
113
+if [ -z "`command -v mulle-homebrew-env`" ]
114
+then
115
+   cat <<EOF >&2
116
+mulle-homebrew-env not found in PATH.
117
+Visit the homepage for installation instructions:
118
+   https://github.com/mulle-nat/mulle-homebrew
119
+EOF
120
+   exit 1
121
+fi
122
+
123
+INSTALLED_MULLE_HOMEBREW_VERSION="`mulle-homebrew-env version`" || exit 1
124
+LIBEXEC_DIR="`mulle-homebrew-env libexec-path`" || exit 1
125
+
126
+. "${LIBEXEC_DIR}/mulle-homebrew.sh"    || exit 1
127
+. "${LIBEXEC_DIR}/mulle-git.sh"         || exit 1
128
+. "${LIBEXEC_DIR}/mulle-version.sh"     || exit 1
129
+. "${LIBEXEC_DIR}/mulle-environment.sh" || exit 1
130
+
131
+
132
+main()
133
+{
134
+   if [ "${DO_GIT_RELEASE}" != "YES" -a "${DO_GENERATE_FORMULA}" != "YES" ]
135
+   then
136
+      fail "Nothing to do. release-info.sh and formula-info.sh are missing"
137
+   fi
138
+
139
+   if [ "${DO_GIT_RELEASE}" = "YES" ]
140
+   then
141
+     # do the release
142
+      git_main "${BRANCH}" "${ORIGIN}" "${TAG}" "${GITHUB}" || exit 1
143
+   fi
144
+
145
+   if [ "${DO_GENERATE_FORMULA}" = "YES" ]
146
+   then
147
+      # generate the formula and push it
148
+      homebrew_main "${PROJECT}" \
149
+                    "${NAME}" \
150
+                    "${VERSION}" \
151
+                    "${DEPENDENCIES}" \
152
+                    "${BUILD_DEPENDENCIES}" \
153
+                    "${HOMEPAGE_URL}" \
154
+                    "${DESC}" \
155
+                    "${ARCHIVE_URL}" \
156
+                    "${HOMEBREW_TAP}" \
157
+                    "${RBFILE}"
158
+   fi
159
+}
160
+
161
+main "$@"
0 162
new file mode 100644
... ...
@@ -0,0 +1,4 @@
0
+PUBLISHER="mulle-nat"
1
+PUBLISHER_FULLNAME="Mulle kybernetiK"
2
+PUBLISHER_TAP="mulle-kybernetik/software"
3
+
0 4
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 1
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 1
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 441
 
442 442
  static char    *default_options[] =
443 443
 {
444
-   "document_root",   "/tmp/MulleScionDox",
444
+#ifndef DEBUG
445
+   "document_root", "/usr/local/share/mulle-scion/dox",
446
+#else
447
+   "document_root", "/Volumes/Source/srcM/MulleScion/dox",
448
+#endif
445 449
    "listening_ports", "127.0.0.1:18048",
446 450
    "num_threads", "1",
447 451
    "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 466
    if( s)
467 467
       default_options[ 3] = s;
468 468
 
469
-   path = @"/tmp/MulleScionDox/properties.plist";
469
+#ifndef DEBUG
470
+   path = @"/usr/local/share/mulle-scion/dox/properties.plist";
471
+#else
472
+   path = @"/Volumes/Source/srcM/MulleScion/dox/properties.plist";
473
+#endif
470 474
    s = getenv( "MulleScionServerPlist");
471 475
    if( s)
472 476
       path = [NSString stringWithCString:s];
473 477
deleted file mode 120000
... ...
@@ -1 +0,0 @@
1
-run-test.sh
2 1
\ 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 38
 
39 39
 
40 40
 # 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
41
+MULLE_SCION=`ls -1 "${PWD}/../build/mulle-scion" | tail -1 2> /dev/null`
54 42
 
55 43
 if [ -z "${MULLE_SCION}" ]
56 44
 then
57
-   echo "mulle-scion can not be found" >&2
45
+   echo "mulle-scion can not be found ($PWD)" >&2
58 46
    exit 1
59 47
 fi
60 48
 
61
-DIR=${1:-`pwd`}
49
+DIR=`pwd`
62 50
 shift
63 51
 
64
-HAVE_WARNED="no"
52
+HAVE_WARNED="NO"
65 53
 RUNS=0
66 54
 
67 55
 search_plist()
... ...
@@ -128,9 +134,9 @@ run()
128 128
 
129 129
    pwd=`pwd`
130 130
    pretty_template=`relpath "$pwd"/"$template" "$root"`
131
-   if [ "$VERBOSE" = "yes" ]
131
+   if [ "$VERBOSE" = "YES" ]
132 132
    then
133
-      echo "$pretty_template"
133
+      echo "$pretty_template" >&2
134 134
    fi
135 135
 
136 136
    RUNS=`expr $RUNS + 1`
... ...
@@ -246,10 +252,10 @@ run_test()
246 246
       if [ "$plist" = "" ]
247 247
       then
248 248
          plist="none"
249
-         if [ "$HAVE_WARNED" != "yes" ]
249
+         if [ "$HAVE_WARNED" != "YES" ]
250 250
          then
251 251
             echo "warning: no default.plist found" >&2
252
-            HAVE_WARNED="yes"
252
+            HAVE_WARNED="YES"
253 253
          fi
254 254
       fi
255 255
    fi
... ...
@@ -344,7 +350,7 @@ test_binary()
344 344
 
345 345
    if [ $code -eq 127 ]
346 346
    then
347
-      echo "mulle-scion can not be found" >&2
347
+      echo "$MULLE_SCION not in path ($PWD, $PATH)" >&2
348 348
       exit 1
349 349
    fi
350 350