From 74e2795bc59095c29118be35fc891814acfab1a9 Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Fri, 15 Nov 2019 19:51:17 +0000 Subject: [PATCH] ruby config option added to install software script. --- one-time-stuff/basic-settings.sh | 2 +- one-time-stuff/install-software.sh | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/one-time-stuff/basic-settings.sh b/one-time-stuff/basic-settings.sh index ced31ec..b3c71bc 100755 --- a/one-time-stuff/basic-settings.sh +++ b/one-time-stuff/basic-settings.sh @@ -94,6 +94,6 @@ esac # ---------------------------------------------------------- echo "----- Done ------------------------------------------" -echo "to take effect now, you may need to run:" +echo "to take effect now, you need to run:" echo "source ~/.bashrc" diff --git a/one-time-stuff/install-software.sh b/one-time-stuff/install-software.sh index be2e3c0..0459a44 100755 --- a/one-time-stuff/install-software.sh +++ b/one-time-stuff/install-software.sh @@ -80,3 +80,27 @@ install_collection 'mariadb-server' mariadb-server echo "----- Install ruby + build-essential ----------------" install_collection 'ruby, build-essential' ruby-full build-essential zlib1g-dev +echo "----- Append ruby gems to ~/.bashrc -----------------" +read -p 'Set GEM_HOME and append path with gems/bin? [y/N]: ' add_gems +case $add_gems in + [Yy]* ) + echo 'Appending ~/.bashrc' + ( + cat << 'RUBY' + +# Install Ruby Gems to ~/gems +export GEM_HOME="$HOME/gems" +export PATH="$HOME/gems/bin:$PATH" + +RUBY +) >> "$HOME/.bashrc" + + echo "----- Done ------------------------------------------" + echo "to take effect now, you need to run:" + echo "source ~/.bashrc" + ;; + * ) + echo 'Skipping' + ;; +esac +