summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/Makefile.am10
-rw-r--r--bin/couchdb.bat.tpl.in14
2 files changed, 24 insertions, 0 deletions
diff --git a/bin/Makefile.am b/bin/Makefile.am
index cb0a827a..93a53192 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -10,7 +10,12 @@
## License for the specific language governing permissions and limitations under
## the License.
+if WINDOWS
+bin_SCRIPTS = couchdb.bat
+else
bin_SCRIPTS = couchdb couchjs
+endif
+
noinst_SCRIPTS = couchjs_dev
if HELP2MAN
@@ -69,6 +74,11 @@ couchjs_dev: couchjs.tpl
$@ < $<
chmod +x $@
+couchdb.bat: couchdb.bat.tpl
+ sed -e "s|%ICU_CONFIG%|$(ICU_CONFIG)|g" \
+ -e "s|%version%|@version@|g" \
+ $< > $@
+
HELP2MAN_OPTION=--no-info --help-option="-h" --version-option="-V"
# XXX: Because the scripts are made at build time for the user we need to
diff --git a/bin/couchdb.bat.tpl.in b/bin/couchdb.bat.tpl.in
new file mode 100644
index 00000000..99c096f1
--- /dev/null
+++ b/bin/couchdb.bat.tpl.in
@@ -0,0 +1,14 @@
+@echo off
+setlocal
+rem First change to the erlang bin directory
+cd %~dp0
+
+rem Allow a different erlang executable (eg, werl) to be used.
+if "%ERL%x" == "x" set ERL=erl.exe
+
+echo CouchDB %version% - prepare to relax...
+%ERL% -smp auto -sasl errlog_type error ^
+ -eval "application:load(crypto)" ^
+ -eval "application:load(couch)" ^
+ -eval "crypto:start()" ^
+ -eval "couch_server:start([""../etc/couchdb/default.ini"", ""../etc/couchdb/local.ini""]), receive done -> done end."