summaryrefslogtreecommitdiff
path: root/ruby.sh
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-04-01 15:37:43 +0200
committerAndreas Maunz <andreas@maunz.de>2011-04-01 15:37:43 +0200
commit7dacb96c5c4c46f8fd0c76bd26e5d37319bb5eb1 (patch)
treef271b93c98e0c5193911197f90decc505a18c28c /ruby.sh
parentb69506cc0d7b3b2336444b6458cde7507388a8ca (diff)
all
Diffstat (limited to 'ruby.sh')
-rwxr-xr-xruby.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/ruby.sh b/ruby.sh
index b3cb32d..8c3361a 100755
--- a/ruby.sh
+++ b/ruby.sh
@@ -6,6 +6,9 @@
# Author: Christoph Helma, Andreas Maunz.
#
+source "`pwd`/utils.sh"
+DIR="`pwd`"
+
if [ "$(id -u)" = "0" ]; then
echo "This script must be run as non-root." 1>&2
exit 1
@@ -19,13 +22,11 @@ if [ ! -e "$WGET" ]; then
fi
# Pkg
-source ./utils.sh
LOG="/tmp/`basename $0`-log.txt"
echo
echo "Ruby Enterprise edition ('$RUBY_DEST', '$LOG')."
-DIR="`pwd`"
mkdir "$RUBY_DEST" >/dev/null 2>&1
if [ ! -d "$RUBY_DEST" ]; then
@@ -48,7 +49,6 @@ if [ ! $RUBY_DONE ]; then
cmd="sh /tmp/$RUBY_VER/installer --dont-install-useful-gems --no-dev-docs --auto=$RUBY_DEST" && run_cmd "$cmd" "Install"
fi
-cd "$DIR"
if ! [ -f "$RUBY_CONF" ]; then
@@ -83,3 +83,4 @@ if [ "$PASSENGER_SKIP" != "s" ]; then
fi
+cd "$DIR"