]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - bin/lp_solve_wrapper
Add a wrapper which sets the LD_LIBRARY_PATH for lp_solve before executing a python...
[dead/census-tools.git] / bin / lp_solve_wrapper
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 $*