From 696c21c59770f35887b65149d5fcd34193b1cf9f Mon Sep 17 00:00:00 2001 From: Daniel Weibel Date: Tue, 24 Mar 2015 19:57:09 +0100 Subject: [PATCH] Set PATH and other vars in .profile.d script This fixes the problem that the config vars (including PATH) might not be set if the buidpack is used together with other buidpacks. --- bin/compile | 9 +++++++++ bin/release | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/compile b/bin/compile index 6bd4e3d..f0b23d7 100755 --- a/bin/compile +++ b/bin/compile @@ -56,3 +56,12 @@ fi $LUA "$OPT_DIR/prepare.lua" $ROCKSPEC $OPT_DIR 2>&1 | indent +# Setting environment variables in .profile.d script (sourced at dyno startup) +mkdir -p "$BUILD_DIR"/.profile.d +cat <"$BUILD_DIR"/.profile.d/lua.sh +PATH=/app/bin:\$PATH +export LD_LIBRARY_PATH=/app/packages/lib:$LD_LIBRARY_PATH +export LUA_CPATH="./?.so;/app/packages/lib/lua/5.1/?.so" +export LUA_PATH="./?.lua;/app/packages/share/lua/5.1/?.lua;/app/packages/share/lua/5.1/?/init.lua" +export STACK=$STACK +EOF diff --git a/bin/release b/bin/release index a1b138b..6ec4c23 100755 --- a/bin/release +++ b/bin/release @@ -3,10 +3,4 @@ cat << EOF --- -config_vars: - PATH: /app/bin:/usr/local/bin:/usr/bin:/bin - LD_LIBRARY_PATH: /app/packages/lib - LUA_CPATH: ./?.so;/app/packages/lib/lua/5.1/?.so - LUA_PATH: ./?.lua;/app/packages/share/lua/5.1/?.lua;/app/packages/share/lua/5.1/?/init.lua - STACK: $STACK EOF