mirror of https://gitee.com/bigwinds/arangodb
cygwinify run, and make run_cygwin.sh a symlink (hope this works ;-)
This commit is contained in:
parent
8dee578f9b
commit
32b4f5de19
31
scripts/run
31
scripts/run
|
@ -9,11 +9,20 @@ else
|
||||||
export SCRIPT=$1
|
export SCRIPT=$1
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -n "$ORIGINAL_PATH"; then
|
||||||
|
# running in cygwin...
|
||||||
|
PS='\\'
|
||||||
|
else
|
||||||
|
PS='/'
|
||||||
|
fi;
|
||||||
|
|
||||||
export PORT=`expr 1024 + $RANDOM`
|
export PORT=`expr 1024 + $RANDOM`
|
||||||
declare -a ARGS
|
declare -a ARGS
|
||||||
export VG=''
|
export VG=''
|
||||||
export VXML=''
|
export VXML=''
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
|
# no valgrind on cygwin, don't care.
|
||||||
if test "$i" == valgrind; then
|
if test "$i" == valgrind; then
|
||||||
export VG='/usr/bin/valgrind --log-file=/tmp/valgrindlog.%p'
|
export VG='/usr/bin/valgrind --log-file=/tmp/valgrindlog.%p'
|
||||||
elif test "$i" == valgrindxml; then
|
elif test "$i" == valgrindxml; then
|
||||||
|
@ -27,7 +36,27 @@ for i in "$@"; do
|
||||||
done
|
done
|
||||||
echo Database has its data in data-$PID
|
echo Database has its data in data-$PID
|
||||||
echo Logfile is in log-$PID
|
echo Logfile is in log-$PID
|
||||||
$VG bin/arangod --configuration none --cluster.agent-path bin/etcd-arango --cluster.arangod-path bin/arangod --cluster.coordinator-config etc/relative/arangod-coordinator.conf --cluster.dbserver-config etc/relative/arangod-dbserver.conf --cluster.disable-dispatcher-frontend false --cluster.disable-dispatcher-kickstarter false --cluster.data-path cluster --cluster.log-path cluster --database.directory data-$PID --log.file log-$PID --server.endpoint tcp://127.0.0.1:$PORT --javascript.startup-directory js --javascript.app-path js/apps --javascript.script $SCRIPT --ruby.action-directory mr/actions/system --ruby.modules-path "mr/server/modules;mr/common/modules" "${ARGS[@]}" --no-server --temp-path /var/tmp/ $VXML
|
$VG bin/arangod \
|
||||||
|
--configuration none \
|
||||||
|
--cluster.agent-path bin${PS}etcd-arango \
|
||||||
|
--cluster.arangod-path bin${PS}arangod \
|
||||||
|
--cluster.coordinator-config etc${PS}relative${PS}arangod-coordinator.conf \
|
||||||
|
--cluster.dbserver-config etc${PS}relative${PS}arangod-dbserver.conf \
|
||||||
|
--cluster.disable-dispatcher-frontend false \
|
||||||
|
--cluster.disable-dispatcher-kickstarter false \
|
||||||
|
--cluster.data-path cluster \
|
||||||
|
--cluster.log-path cluster \
|
||||||
|
--database.directory data-$PID \
|
||||||
|
--log.file log-$PID \
|
||||||
|
--server.endpoint tcp://127.0.0.1:$PORT \
|
||||||
|
--javascript.startup-directory js \
|
||||||
|
--javascript.app-path js${PS}apps \
|
||||||
|
--javascript.script $SCRIPT \
|
||||||
|
--ruby.action-directory mr/actions/system \
|
||||||
|
--ruby.modules-path "mr${PS}server${PS}modules;mr${PS}common${PS}modules" "${ARGS[@]}" \
|
||||||
|
--no-server \
|
||||||
|
--temp-path /var/tmp/ \
|
||||||
|
$VXML
|
||||||
|
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
echo removing log-$PID data-$PID
|
echo removing log-$PID data-$PID
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
export PID=$$
|
|
||||||
mkdir data-$PID
|
|
||||||
export SCRIPT=$1
|
|
||||||
shift
|
|
||||||
export PORT=`expr 1024 + $RANDOM`
|
|
||||||
declare -a ARGS
|
|
||||||
export VG=''
|
|
||||||
export VXML=''
|
|
||||||
for i in "$@"; do
|
|
||||||
if test "$i" == valgrind; then
|
|
||||||
export VG='\usr\bin\valgrind --log-file=\tmp\valgrindlog.%p'
|
|
||||||
elif test "$i" == valgrindxml; then
|
|
||||||
export VG='\usr\bin\valgrind --xml=yes --xml-file=valgrind_testrunner'
|
|
||||||
export VXML="valgrind=\"${VG}\""
|
|
||||||
export VG=${VG}'.xml '
|
|
||||||
else
|
|
||||||
ARGS+=(--javascript.script-parameter)
|
|
||||||
ARGS+=("$i")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo Database has its data in data-$PID
|
|
||||||
echo Logfile is in log-$PID
|
|
||||||
$VG bin/arangod --configuration none --cluster.agent-path 'bin\etcd-arango' --cluster.arangod-path 'bin\arangod' --cluster.coordinator-config 'etc\relative\arangod-coordinator.conf' --cluster.dbserver-config 'etc\relative\arangod-dbserver.conf' --cluster.disable-dispatcher-frontend false --cluster.disable-dispatcher-kickstarter false --cluster.data-path cluster --cluster.log-path cluster --database.directory data-$PID --log.file log-$PID --server.endpoint tcp://localhost:$PORT --javascript.startup-directory js --javascript.app-path 'js\apps' --javascript.script $SCRIPT --ruby.action-directory 'mr\actions\system' --ruby.modules-path 'mr\server\modules;mr\common\modules' "${ARGS[@]}" --temp-path '\var\tmp\' $VXML
|
|
||||||
|
|
||||||
|
|
||||||
if test $? -eq 0; then
|
|
||||||
echo removing log-$PID data-$PID
|
|
||||||
rm -rf log-$PID data-$PID
|
|
||||||
else
|
|
||||||
echo "failed - don't remove log-$PID data-$PID"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo Server has terminated.
|
|
|
@ -0,0 +1 @@
|
||||||
|
run
|
Loading…
Reference in New Issue