1
0
Fork 0
arangodb/utils/arango-upgrade.in

26 lines
543 B
Bash
Executable File

#!/bin/bash
# Placeholders starting with @ will be replaced by make
ARANGOD="@SBINDIR@/arangod"
DATABASE="@DATABASE@"
SCRIPT="@STATICFILES@/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"