aboutsummaryrefslogtreecommitdiffstats
path: root/kerl
diff options
context:
space:
mode:
authorthomasc <[email protected]>2011-08-08 11:55:47 +0200
committerthomasc <[email protected]>2011-08-08 11:55:47 +0200
commit695ff9c9ae3e1941a183b0c9fad1c20ca193311c (patch)
treea64b31b1ee9cde6f118cc30182cd2631d111ec8c /kerl
parent1b0ed66f6734420e3a4f1aae110dabd599ea40d1 (diff)
downloadkerl-695ff9c9ae3e1941a183b0c9fad1c20ca193311c.tar.gz
kerl-695ff9c9ae3e1941a183b0c9fad1c20ca193311c.tar.bz2
kerl-695ff9c9ae3e1941a183b0c9fad1c20ca193311c.zip
Fix build for older Erlang versions
Diffstat (limited to 'kerl')
-rwxr-xr-xkerl10
1 files changed, 6 insertions, 4 deletions
diff --git a/kerl b/kerl
index 0530f75..93f88f3 100755
--- a/kerl
+++ b/kerl
@@ -308,7 +308,8 @@ do_build()
cd "$KERL_BUILD_DIR/$2" && tar xfz "$KERL_DOWNLOAD_DIR/$FILENAME"
fi
echo "Building Erlang/OTP $1 ($2), please wait..."
- cd "$KERL_BUILD_DIR/$2/otp_src_$1"
+ ERL_TOP="$KERL_BUILD_DIR/$2/otp_src_$1"
+ cd "$ERL_TOP"
LOGFILE="$KERL_BUILD_DIR/$2/otp_build_$1.log"
if [ -n "$KERL_USE_AUTOCONF" ]; then
./otp_build setup -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
@@ -322,7 +323,7 @@ do_build()
exit 1
fi
rm -f "$LOGFILE"
- ./otp_build release -a "$KERL_BUILD_DIR/$2/release_$1" > /dev/null 2>&1
+ ERL_TOP="$ERL_TOP" ./otp_build release -a "$KERL_BUILD_DIR/$2/release_$1" > /dev/null 2>&1
cd "$KERL_BUILD_DIR/$2/release_$1"
./Install $INSTALL_OPT "$KERL_BUILD_DIR/$2/release_$1" > /dev/null 2>&1
echo "Erlang/OTP $1 ($2) has been successfully built"
@@ -354,8 +355,9 @@ do_install()
fi
absdir=`cd "$2" && pwd`
echo "Installing Erlang/OTP $rel ($1) in $absdir..."
- cd "$KERL_BUILD_DIR/$1/otp_src_$rel"
- ./otp_build release -a "$absdir" > /dev/null 2>&1 &&
+ ERL_TOP="$KERL_BUILD_DIR/$1/otp_src_$rel"
+ cd "$ERL_TOP"
+ ERL_TOP="$ERL_TOP" ./otp_build release -a "$absdir" > /dev/null 2>&1 &&
cd "$absdir" && ./Install $INSTALL_OPT "$absdir" > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo "Couldn't install Erlang/OTP $rel ($1) in $absdir"