Loading README.md +2 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,8 @@ You can set certain environment variables to control the build process. choosing. * `RUBY_BUILD_SKIP_MIRROR`, if set, forces ruby-build to download packages from their original source URLs instead of using a mirror. * `RUBY_BUILD_ROOT` overrides the default location from where build definitions in `share/ruby-build/` are looked up. * `CC` sets the path to the C compiler. * `RUBY_CFLAGS` lets you pass additional options to the default `CFLAGS`. Use this to override, for instance, the `-O3` option. Loading bin/ruby-build +6 −1 Original line number Diff line number Diff line Loading @@ -907,10 +907,12 @@ usage() { } list_definitions() { shopt -s nullglob { for definition in "${RUBY_BUILD_ROOT}/share/ruby-build/"*; do echo "${definition##*/}" done } | sort shopt -u nullglob } Loading @@ -918,7 +920,10 @@ list_definitions() { unset VERBOSE unset KEEP_BUILD_PATH unset HAS_PATCH if [ -z "$RUBY_BUILD_ROOT" ]; then RUBY_BUILD_ROOT="$(abs_dirname "$0")/.." fi parse_options "$@" Loading test/definitions.bats +15 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,21 @@ NUM_DEFINITIONS="$(ls "$BATS_TEST_DIRNAME"/../share/ruby-build | wc -l)" assert [ "${#lines[*]}" -eq "$NUM_DEFINITIONS" ] } @test "custom RUBY_BUILD_ROOT: nonexistent" { export RUBY_BUILD_ROOT="$TMP" assert [ ! -e "${RUBY_BUILD_ROOT}/share/ruby-build" ] run ruby-build --definitions assert_success "" } @test "custom RUBY_BUILD_ROOT: single definition" { export RUBY_BUILD_ROOT="$TMP" mkdir -p "${RUBY_BUILD_ROOT}/share/ruby-build" touch "${RUBY_BUILD_ROOT}/share/ruby-build/1.9.3-test" run ruby-build --definitions assert_success "1.9.3-test" } @test "installing nonexistent definition" { run ruby-build "nonexistent" "${TMP}/install" assert [ "$status" -eq 2 ] Loading Loading
README.md +2 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,8 @@ You can set certain environment variables to control the build process. choosing. * `RUBY_BUILD_SKIP_MIRROR`, if set, forces ruby-build to download packages from their original source URLs instead of using a mirror. * `RUBY_BUILD_ROOT` overrides the default location from where build definitions in `share/ruby-build/` are looked up. * `CC` sets the path to the C compiler. * `RUBY_CFLAGS` lets you pass additional options to the default `CFLAGS`. Use this to override, for instance, the `-O3` option. Loading
bin/ruby-build +6 −1 Original line number Diff line number Diff line Loading @@ -907,10 +907,12 @@ usage() { } list_definitions() { shopt -s nullglob { for definition in "${RUBY_BUILD_ROOT}/share/ruby-build/"*; do echo "${definition##*/}" done } | sort shopt -u nullglob } Loading @@ -918,7 +920,10 @@ list_definitions() { unset VERBOSE unset KEEP_BUILD_PATH unset HAS_PATCH if [ -z "$RUBY_BUILD_ROOT" ]; then RUBY_BUILD_ROOT="$(abs_dirname "$0")/.." fi parse_options "$@" Loading
test/definitions.bats +15 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,21 @@ NUM_DEFINITIONS="$(ls "$BATS_TEST_DIRNAME"/../share/ruby-build | wc -l)" assert [ "${#lines[*]}" -eq "$NUM_DEFINITIONS" ] } @test "custom RUBY_BUILD_ROOT: nonexistent" { export RUBY_BUILD_ROOT="$TMP" assert [ ! -e "${RUBY_BUILD_ROOT}/share/ruby-build" ] run ruby-build --definitions assert_success "" } @test "custom RUBY_BUILD_ROOT: single definition" { export RUBY_BUILD_ROOT="$TMP" mkdir -p "${RUBY_BUILD_ROOT}/share/ruby-build" touch "${RUBY_BUILD_ROOT}/share/ruby-build/1.9.3-test" run ruby-build --definitions assert_success "1.9.3-test" } @test "installing nonexistent definition" { run ruby-build "nonexistent" "${TMP}/install" assert [ "$status" -eq 2 ] Loading