summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/couchdb.tpl.in24
-rw-r--r--bin/couchjs.tpl.in10
-rwxr-xr-xbootstrap32
3 files changed, 2 insertions, 64 deletions
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index 290d1ec3..b6df1abb 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -40,8 +40,6 @@ HEART_BEAT_TIMEOUT=11
basename=`basename $0`
display_version () {
- # Display version and copyright information.
-
cat << EOF
$basename - %package_name% %version%
@@ -59,8 +57,6 @@ EOF
}
display_help () {
- # Display a short description of the script's behaviour.
-
cat << EOF
Usage: $basename [OPTION]
@@ -92,8 +88,6 @@ EOF
}
display_error () {
- # Display a short instruction referring users to further documentation.
-
if test -n "$1"; then
echo $1 >&2
fi
@@ -103,8 +97,6 @@ display_error () {
}
_load_configuration () {
- # Load ini configuration and overwrite default variables.
-
dbrootdir_ini_value=`%AWK% -F = "/^DbRootDir=/{print \\$2}" < $INI_FILE`
if test -n "$dbrootdir_ini_value"; then
LIB_DIRECTORY=$dbrootdir_ini_value
@@ -123,8 +115,6 @@ _get_pid () {
}
check_status () {
- # Check the status of the running Apache CouchDB process.
-
PID=`_get_pid`
if test -n "$PID"; then
if kill -0 $PID 2> /dev/null; then
@@ -142,8 +132,6 @@ EOF
}
check_environment () {
- # Check the environment for common problems to prevent nasty backtraces.
-
message_prefix="Apache CouchDB needs write permission on the"
if test ! -w $LIB_DIRECTORY; then
echo "$message_prefix data directory: $LIB_DIRECTORY" >&2
@@ -201,8 +189,6 @@ check_environment () {
}
start_couchdb () {
- # Start Apache CouchDB with the Erlang interpreter.
-
if test ! "$RECURSED_BOOLEAN" = "true"; then
if check_status 2> /dev/null; then
exit $SCRIPT_OK
@@ -230,7 +216,6 @@ start_couchdb () {
-couchini $INI_FILE"
if test "$BACKGROUND_BOOLEAN" = "true" \
-a "$RECURSED_BOOLEAN" = "false"; then
- # Recursively call and detach a duplicate couchdb command.
$0 -c $INI_FILE -b -r $RESPAWN_TIMEOUT -p $PID_FILE \
-o $STDOUT_FILE -e $STDERR_FILE -R &
echo "Apache CouchDB has started. Time to relax."
@@ -244,16 +229,12 @@ start_couchdb () {
PID=`_get_pid`
if test -n "$PID"; then
if kill -0 $PID 2> /dev/null; then
- # Found an existing process, do not respawn.
return $SCRIPT_ERROR
fi
- # Stale PID file, we should respawn.
else
- # No PID file, do not respawn.
return $SCRIPT_OK
fi
if test "$RESPAWN_TIMEOUT" = "0"; then
- # RESPAWN_TIMEOUT is zero, do not respawn.
return $SCRIPT_OK
fi
if test "$RESPAWN_TIMEOUT" != "1"; then
@@ -271,11 +252,8 @@ EOF
}
stop_couchdb () {
- # Send SIGHUP to the running Apache CouchDB process.
-
PID=`_get_pid`
if test -n "$PID"; then
- # Clean up PID file or leave stale for respawn.
if test "$1" = "false"; then
echo > $PID_FILE
fi
@@ -303,8 +281,6 @@ stop_couchdb () {
}
parse_script_option_list () {
- # Parse the script option list and take the appropriate action.
-
set +e
options=`getopt hVc:ibp:r:Ro:e:skd $@`
if test ! $? -eq 0; then
diff --git a/bin/couchjs.tpl.in b/bin/couchjs.tpl.in
index 8b970756..ce9aecbe 100644
--- a/bin/couchjs.tpl.in
+++ b/bin/couchjs.tpl.in
@@ -22,8 +22,6 @@ DEFAULT_VERSION=170
basename=`basename $0`
display_version () {
- # Display version and copyright information.
-
cat << EOF
$basename - %package_name% %version%
@@ -41,8 +39,6 @@ EOF
}
display_help () {
- # Display a short description of the script's behaviour.
-
cat << EOF
Usage: $basename [FILE]
@@ -60,8 +56,6 @@ EOF
}
display_error () {
- # Display a short instruction referring users to further documentation.
-
if test -n "$1"; then
echo $1 >&2
fi
@@ -71,14 +65,10 @@ display_error () {
}
run_couchjs () {
- # Run the JavaScript interpreter shell with options.
-
exec %libbindir%/%couchjs_command_name% $@
}
parse_script_option_list () {
- # Parse the script option list and take the appropriate action.
-
set +e
options=`getopt hV $@`
if test ! $? -eq 0; then
diff --git a/bootstrap b/bootstrap
index 78302a01..d5a7c264 100755
--- a/bootstrap
+++ b/bootstrap
@@ -33,8 +33,6 @@ REPOSITORY_URI="http://svn.apache.org/repos/asf/incubator/couchdb/trunk"
basename=`basename $0`
extract_configuration_variable () {
- # Extract variables from the local M4 configuration.
-
variable_name=$1
temporary_file=`mktemp`
echo "changequote(\`[', \`]')" > $temporary_file
@@ -51,8 +49,6 @@ extract_configuration_variable () {
}
display_version () {
- # Display version and copyright information.
-
package_name=`extract_configuration_variable LOCAL_PACKAGE_NAME`
version=`extract_configuration_variable LOCAL_VERSION`
cat << EOF
@@ -72,8 +68,6 @@ EOF
}
display_help () {
- # Display a short description of the script's behaviour.
-
bug_uri=`extract_configuration_variable LOCAL_BUG_URI`
cat << EOF
Usage: $basename [OPTION]...
@@ -96,8 +90,6 @@ EOF
}
display_error () {
- # Display a short instruction referring users to further documentation.
-
if test -n "$1"; then
echo $1 >&2
fi
@@ -107,8 +99,6 @@ display_error () {
}
check_svn_environment () {
- # Check the Subversion environment for sanity.
-
if test -x `which svn || true`; then
echo "Warning: Unable to find the svn command."
return $SCRIPT_ERROR
@@ -125,8 +115,6 @@ check_svn_environment () {
}
generate_acinclude () {
- # Generate the acinclude.m4 file using the Subversion repository.
-
release_code=`sed -e "s/\[//g" -e "s/\]//g" -e "s/(//g" -e "s/)//g" \
< $ACINCLUDE_IN_FILE | awk "/LOCAL_VERSION_STAGE, /{print \$2}"`
repository_boolean=false
@@ -149,8 +137,6 @@ generate_acinclude () {
}
process_file_collection () {
- # Process files required to complete the bootstrap.
-
echo "Installing \`"$BUILD_AUX_DIRECTORY"'"
mkdir -p $BUILD_AUX_DIRECTORY
echo "Installing \`"$CONFIG_GUESS_FILE"'"
@@ -167,8 +153,6 @@ process_file_collection () {
}
run_aclocal () {
- # Run the correct version of aclocal.
-
if test -x `which aclocal || true`; then
echo "Running aclocal"
`which aclocal` -I m4
@@ -179,8 +163,6 @@ run_aclocal () {
}
run_libtoolize () {
- # Run the correct version of libtoolize.
-
if test -x `which libtoolize || true`; then
echo "Running libtoolize"
`which libtoolize` -f -c
@@ -196,8 +178,6 @@ run_libtoolize () {
}
run_autoheader () {
- # Run the correct version of autoheader.
-
if test -x `which autoheader || true`; then
echo "Running autoheader"
`which autoheader` -f
@@ -208,8 +188,6 @@ run_autoheader () {
}
run_automake () {
- # Run the correct version of automake.
-
AUTOMAKE_OPTION_COLLECTION=""
if test -x `which automake || true`; then
echo "Running automake"
@@ -221,8 +199,6 @@ run_automake () {
}
run_autoconf () {
- # Run the correct version of autoconf.
-
if test -x `which autoconf || true`; then
echo "Running autoconf"
`which autoconf` -f
@@ -233,8 +209,6 @@ run_autoconf () {
}
run_command_collection () {
- # Run commands required to complete the bootstrap.
-
run_libtoolize
run_aclocal
run_autoheader
@@ -249,15 +223,13 @@ EOF
}
parse_script_option_list () {
- # Parse the script option list and take the appropriate action.
-
set +e
- argument_list=`getopt vhC $@`
+ options=`getopt vhC $@`
if test ! $? -eq 0; then
display_error
fi
set -e
- eval set -- "$argument_list"
+ eval set -- "$options"
while [ $# -gt 0 ]; do
case "$1" in
-v) shift; display_version; exit $SCRIPT_OK;;