]> gitweb.michael.orlitzky.com - dead/census-tools.git/commitdiff
Add a wrapper which sets the LD_LIBRARY_PATH for lp_solve before executing a python...
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 5 Apr 2010 19:24:28 +0000 (15:24 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 5 Apr 2010 19:24:28 +0000 (15:24 -0400)
bin/lp_solve_wrapper [new file with mode: 0755]

diff --git a/bin/lp_solve_wrapper b/bin/lp_solve_wrapper
new file mode 100755 (executable)
index 0000000..c7d2bd7
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# This wrapper is required to execute python scripts that utilize the
+# lp_solve library. We can't set LD_LIBRARY_PATH from within the
+# python script itself, so this wrapper simply sets it before
+# executing the script.
+#
+
+export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../lib/lp_solve"
+
+# Run all but the first command-line argument. This should
+# execute the python script, followed by all of its arguments.
+python $*