Ruby install script; packages+installs as a .deb or .rpm from source Is this bad practice?  Also, how can it be improved?

#!/usr/bin/env bash

RUBY_VERSION=2.1.0
printf "Installing Ruby $RUBY_VERSION\\n"

if [ -d ruby_build ]; then
    rm -Rf ruby_build
fi

if [[ `command -v ruby` &amp;&amp; `ruby --version | colrm 11` == "ruby $RUBY_VERSION" ]] ; then
    echo "You already have this version of Ruby: $RUBY_VERSION"
    exit 113
fi

sudo apt-get build-dep -y ruby1.9.1

mkdir ruby_build &amp;&amp; cd ruby_build
curl -O "http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-$RUBY_VERSION.tar.gz"
tar xf "ruby-$RUBY_VERSION.tar.gz"
cd "ruby-$RUBY_VERSION"

./configure
make

sudo checkinstall -y --pkgversion "$RUBY_VERSION" --provides "ruby-interpreter" --replaces="ruby-1.9.2"
cd ../.. &amp;&amp; rm -Rf ruby_build
First,I would like to point out that not all .deb-based distributions are as fond of sudo as Ubuntu is. For example, Debian doesn't use sudo out of the box.

It appears that you're trying to build a newer version of Ruby than is available in the stock package repository. In that case, why not make a proper .deb package with its .dsc and publish it in a private APT repository?  Then, everything integrates properly into the distribution the way package management is supposed to work, including the build process and subsequent updates.  Everyone will have a better experience when you work with the system instead of against it.