1
0
Fork 0

issue #130: arango-password did not work with --enable-relative=devel

This commit is contained in:
Jan Steemann 2012-07-26 11:21:30 +02:00
parent 4a7e94395b
commit 6ce1ce98b7
3 changed files with 25 additions and 8 deletions

View File

@ -337,12 +337,21 @@ built-sources: build.h errorfiles $(JAVASCRIPT_HEADER)
################################################################################ ################################################################################
bin/arango-password: bin/arango-password.in bin/arango-password: bin/arango-password.in
if ENABLE_RELATIVE_DEVEL
sed \
-e 's%@SBINDIR@%bin%g' \
-e 's%@DATABASE@%${TRI_DATABASE_DIR}%g' \
-e 's%@STATICFILES@%${TRI_PKGDATA_DIR}%g' \
$< > $@
chmod 755 $@
else
sed \ sed \
-e 's%@SBINDIR@%${TRI_SBIN_DIR}%g' \ -e 's%@SBINDIR@%${TRI_SBIN_DIR}%g' \
-e 's%@DATABASE@%${TRI_DATABASE_DIR}%g' \ -e 's%@DATABASE@%${TRI_DATABASE_DIR}%g' \
-e 's%@STATICFILES@%${TRI_PKGDATA_DIR}%g' \ -e 's%@STATICFILES@%${TRI_PKGDATA_DIR}%g' \
$< > $@ $< > $@
chmod 755 $@ chmod 755 $@
endif
CLEANUP += bin/arango-password CLEANUP += bin/arango-password

View File

@ -5369,12 +5369,18 @@ built-sources: build.h errorfiles $(JAVASCRIPT_HEADER)
################################################################################ ################################################################################
bin/arango-password: bin/arango-password.in bin/arango-password: bin/arango-password.in
sed \ @ENABLE_RELATIVE_DEVEL_TRUE@ sed \
-e 's%@SBINDIR@%${TRI_SBIN_DIR}%g' \ @ENABLE_RELATIVE_DEVEL_TRUE@ -e 's%@SBINDIR@%bin%g' \
-e 's%@DATABASE@%${TRI_DATABASE_DIR}%g' \ @ENABLE_RELATIVE_DEVEL_TRUE@ -e 's%@DATABASE@%${TRI_DATABASE_DIR}%g' \
-e 's%@STATICFILES@%${TRI_PKGDATA_DIR}%g' \ @ENABLE_RELATIVE_DEVEL_TRUE@ -e 's%@STATICFILES@%${TRI_PKGDATA_DIR}%g' \
$< > $@ @ENABLE_RELATIVE_DEVEL_TRUE@ $< > $@
chmod 755 $@ @ENABLE_RELATIVE_DEVEL_TRUE@ chmod 755 $@
@ENABLE_RELATIVE_DEVEL_FALSE@ sed \
@ENABLE_RELATIVE_DEVEL_FALSE@ -e 's%@SBINDIR@%${TRI_SBIN_DIR}%g' \
@ENABLE_RELATIVE_DEVEL_FALSE@ -e 's%@DATABASE@%${TRI_DATABASE_DIR}%g' \
@ENABLE_RELATIVE_DEVEL_FALSE@ -e 's%@STATICFILES@%${TRI_PKGDATA_DIR}%g' \
@ENABLE_RELATIVE_DEVEL_FALSE@ $< > $@
@ENABLE_RELATIVE_DEVEL_FALSE@ chmod 755 $@
@ENABLE_MRUBY_TRUE@.setup-mr-directories: @ENABLE_MRUBY_TRUE@.setup-mr-directories:
@ENABLE_MRUBY_TRUE@ @test -d mr || mkdir mr @ENABLE_MRUBY_TRUE@ @test -d mr || mkdir mr

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
# Placeholders starting with @ will be replaced by make
ARANGOD="@SBINDIR@/arangod" ARANGOD="@SBINDIR@/arangod"
DATABASE="@DATABASE@" DATABASE="@DATABASE@"
SCRIPT="@STATICFILES@/js/server/arango-password.js" SCRIPT="@STATICFILES@/js/server/arango-password.js"
@ -9,7 +11,7 @@ if [ "$#" -lt 1 ]; then
exit 1 exit 1
fi fi
if [ "$1" == "--database" ]; then if [ "$1" == "--database" ] || [ "$1" == "--database.directory" ] ; then
if [ "$#" -lt 3 ]; then if [ "$#" -lt 3 ]; then
echo "usage: $0 [--database <path>] <username> [<password>]" echo "usage: $0 [--database <path>] <username> [<password>]"
exit 1 exit 1
@ -21,7 +23,7 @@ if [ "$1" == "--database" ]; then
fi fi
if test ! -d "$DATABASE"; then if test ! -d "$DATABASE"; then
echo "$0: database directory '$DATABASE' does not exit" echo "$0: database directory '$DATABASE' does not exist"
exit 1 exit 1
fi fi