Unverified Commit fbdf88cc authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Accept ruby configuration flags as extra position arguments on the command line

parent f7d63b7d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -221,9 +221,12 @@ cleanup() {

trap cleanup SIGINT

build_args=(${KEEP:+--keep} ${VERBOSE:+--verbose} ${HAS_PATCH:+--patch} "$DEFINITION" "$PREFIX")
[ ${#EXTRA_ARGUMENTS[@]} -eq 0 ] || build_args+=(-- "${EXTRA_ARGUMENTS[@]}")

# Invoke `ruby-build` and record the exit status in $STATUS.
STATUS=0
ruby-build $KEEP $VERBOSE $HAS_PATCH "$DEFINITION" "$PREFIX" || STATUS="$?"
ruby-build "${build_args[@]}" || STATUS="$?"

# Display a more helpful message if the definition wasn't found.
if [ "$STATUS" == "2" ]; then
+4 −0
Original line number Diff line number Diff line
@@ -1331,6 +1331,10 @@ if [ "${#ARGUMENTS[@]}" -gt 2 ]; then
  EARLY_EXIT=usage_error
fi

if [ "${#EXTRA_ARGUMENTS[@]}" -gt 0 ]; then
  RUBY_CONFIGURE_OPTS_ARRAY=("${EXTRA_ARGUMENTS[@]}")
fi

case "$EARLY_EXIT" in
help )
  version