-program_name=$0
-
-env_debug_enabled=false
-if [[ -n "$JENKINS_HOME" ]]; then
- declare -r jenkins_build_environment=true
-else
- declare -r jenkins_build_environment=false
-fi
-
-export ACLOCAL
-export AUTOCONF
-export AUTOHEADER
-export AUTOM4TE
-export AUTOMAKE
-export AUTORECONF
-export CONFIGURE_ARG
-export DEBUG
-export GNU_BUILD_FLAGS
-export LIBTOOLIZE
-export LIBTOOLIZE_OPTIONS
-export MAKE
-export PREFIX_ARG
-export TESTS_ENVIRONMENT
-export VERBOSE
-export WARNINGS
-
-case $OSTYPE in
- darwin*)
- export MallocGuardEdges
- export MallocErrorAbort
- export MallocScribble
- ;;
-esac
-
-# We check for DEBUG twice, once before we source the config file, and once afterward
-env_debug_enabled=false
-if [[ -n "$DEBUG" ]]; then
- env_debug_enabled=true
- enable_debug
- print_setup
-fi
-
-# Variables which only can be set by .bootstrap
-BOOTSTRAP_SNAPSHOT=false
-BOOTSTRAP_SNAPSHOT_CHECK=
-
-if [ -f '.bootstrap' ]; then
- source '.bootstrap'
-fi
-
-if $env_debug_enabled; then
- enable_debug
-else
+bootstrap ()
+{
+ check_shell 'bootstrap.sh'
+ local env_debug_enabled=false
+ local debug=false
+
+ export ACLOCAL
+ export AUTOCONF
+ export AUTOHEADER
+ export AUTOM4TE
+ export AUTOMAKE
+ export AUTORECONF
+ export CONFIGURE_ARG
+ export DEBUG
+ export GNU_BUILD_FLAGS
+ export LIBTOOLIZE
+ export LIBTOOLIZE_OPTIONS
+ export MAKE
+ export PREFIX_ARG
+ export TESTS_ENVIRONMENT
+ export VERBOSE
+ export WARNINGS
+
+ case $OSTYPE in
+ darwin*)
+ export MallocGuardEdges
+ export MallocErrorAbort
+ export MallocScribble
+ ;;
+ esac
+
+ # We check for DEBUG twice, once before we source the config file, and once afterward