Commit 852778e8 authored by James Tucker's avatar James Tucker
Browse files

Add a -k/--keep option to ruby-build to keep the build path around after builds

parent f6c2bfe8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -396,6 +396,15 @@ if [ -z "$PREFIX_PATH" ]; then
  usage
fi

OPTIONS="$3"
for option in $OPTIONS; do
  case "$option" in
    "-k" | "--keep" )
      KEEP_BUILD_PATH="y"
      ;;
  esac
done

if [ -z "$TMPDIR" ]; then
  TMP="/tmp"
else
@@ -428,5 +437,5 @@ unset RUBYLIB
trap build_failed ERR
mkdir -p "$BUILD_PATH"
source "$DEFINITION_PATH"
rm -fr "$BUILD_PATH"
[ -z "${KEEP_BUILD_PATH}" ] && rm -fr "$BUILD_PATH"
trap - ERR