]> git.lizzy.rs Git - metalua.git/commitdiff
configurable installation and build paths
authorAlexander Gladysh <agladysh@gmail.com>
Mon, 19 Jan 2009 18:58:18 +0000 (21:58 +0300)
committerAlexander Gladysh <agladysh@gmail.com>
Thu, 22 Jan 2009 06:17:36 +0000 (09:17 +0300)
For example:

    $ INSTALL_BIN=/usr/local/bin INSTALL_LIB=/usr/local/lib/lua/5.1 ./make.sh

Signed-off-by: Alexander Gladysh <agladysh@gmail.com>
src/make.sh

index 5cb78c524855d06073f59a8416a33f336af42b8a..d5129c160d6398ded833bc277257351e5cd14128 100755 (executable)
@@ -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