Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setup script for RedHat based Linux #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ install() {
sudo apt-get install -y "$package"
fi
elif has-executable yum; then
package="${yum_package:-$default_package}"
package="${rpm_package:-$default_package}"

if [[ -n $package ]]; then
sudo yum install -y "$package"
Expand All @@ -101,16 +101,20 @@ install() {

check-for-build-tools() {
if [[ $platform == "linux" ]]; then
if ! has-executable apt-get; then
if has-executable apt-get; then
# TODO: Check if build-essential is installed on Debian?
true
elif has-executable yum; then
# TODO: Check if 'Development Tools' group is installed on RedHat?
true
else
error "You don't seem to have a package manager installed."
echo-wrapped "\
The setup script assumes you're using Debian or a Debian-derived flavor of
Linux (i.e. something with Apt). If this is not the case, then we would
The setup script assumes you're using Debian, RedHat or a derived flavor of
Linux (i.e. something with Apt or Yum). If this is not the case, then we would
gladly take a PR fixing this!"
exit 1
fi

# TODO: Check if build-essential is installed on Debian?
else
if ! has-executable brew; then
error "You don't seem to have Homebrew installed."
Expand Down Expand Up @@ -150,11 +154,6 @@ install-dependencies() {
start postgresql
fi

if ! has-executable heroku; then
banner 'Installing Heroku'
install brew=heroku/brew/heroku heroku
fi

if has-executable rbenv; then
if ! (rbenv versions | grep $RUBY_VERSION'\>' &>/dev/null); then
banner "Installing Ruby $RUBY_VERSION with rbenv"
Expand Down