mirror of https://gitee.com/bigwinds/arangodb
31 lines
687 B
Bash
Executable File
31 lines
687 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Placeholders starting with @ will be replaced by make
|
|
|
|
ARANGOD="@SBINDIR@/arangod"
|
|
DATABASE="@DATABASEDIR@"
|
|
MODULESPATH="@PKGDATADIR@/js/server/modules;@PKGDATADIR@/js/common/modules"
|
|
SCRIPT="@PKGDATADIR@/js/server/arango-upgrade.js"
|
|
|
|
if [ "$#" -lt 1 ]; then
|
|
echo "usage: $0 [--database <path>]"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$1" == "--database" ] || [ "$1" == "--database.directory" ] ; then
|
|
shift
|
|
DATABASE="$1"
|
|
shift
|
|
fi
|
|
|
|
if test ! -d "$DATABASE"; then
|
|
echo "$0: database directory '$DATABASE' does not exist"
|
|
exit 1
|
|
fi
|
|
|
|
$ARANGOD \
|
|
-c none \
|
|
--database.directory "$DATABASE" \
|
|
--javascript.script "$SCRIPT" \
|
|
--javascript.modules-path "$MODULESPATH"
|