From a372528f7c29fe35e3f0ba2400c63876f80d6268 Mon Sep 17 00:00:00 2001 From: Alexander Gladysh Date: Mon, 19 Jan 2009 21:58:18 +0300 Subject: [PATCH] configurable installation and build paths For example: $ INSTALL_BIN=/usr/local/bin INSTALL_LIB=/usr/local/lib/lua/5.1 ./make.sh Signed-off-by: Alexander Gladysh --- src/make.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/make.sh b/src/make.sh index 5cb78c5..d5129c1 100755 --- a/src/make.sh +++ b/src/make.sh @@ -5,15 +5,29 @@ BASE=${PWD} # Temporary building location. # Upon installation, everything will be moved to ${INSTALL_LIB} and ${INSTALL_BIN} -BUILD=/tmp/metalua-build -BUILD_BIN=${BUILD}/bin -BUILD_LIB=${BUILD}/lib + +if [ -z "${BUILD}" ]; then + BUILD=/tmp/metalua-build +fi + +if [ -z "${BUILD_BIN}" ]; then + BUILD_BIN=${BUILD}/bin +fi + +if [ -z "${BUILD_LIB}" ]; then + BUILD_LIB=${BUILD}/lib +fi # Where to place the final results # INSTALL_BIN=/usr/local/bin # INSTALL_LIB=/usr/local/lib/lua/5.1 -INSTALL_BIN=~/local/bin -INSTALL_LIB=~/local/lib/lua +if [ -z "${INSTALL_BIN}" ]; then + INSTALL_BIN=~/local/bin +fi + +if [ -z "${INSTALL_LIB}" ]; then + INSTALL_LIB=~/local/lib/lua +fi # Where to find Lua executables. # On many Debian-based systems, those can be installed with "sudo apt-get install lua5.1" @@ -96,4 +110,4 @@ chmod a+x make-install.sh echo echo "Build completed, proceed to installation with './make-install.sh' or 'sudo ./make-install.sh'" -echo \ No newline at end of file +echo -- 2.44.0