From 5f9b6eeaf4483d7f4e9179e5e249266490258226 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Tue, 14 Dec 2010 02:51:44 -0800 Subject: [PATCH] install.do: stub /usr/bin programs: be smarter about finding the libdir. We were hardcoding the absolute $LIBDIR location, which sounds smart, but not if you're doing "make install" into a temp dir that will end up somewhere else later. Instead, look for ../lib/redo/ from wherever the binary is installed. --- install.do | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.do b/install.do index 1922fcc..3be5df6 100644 --- a/install.do +++ b/install.do @@ -33,8 +33,9 @@ for d in redo redo-ifchange redo-ifcreate redo-always redo-stamp redo-oob; do fix=$(echo $d | sed 's,-,_,g') cat >install.wrapper <<-EOF #!/usr/bin/python - import sys; - sys.path.insert(0, '$LIBDIR') + import sys, os; + exedir = os.path.dirname(os.path.abspath(sys.argv[0])) + sys.path.insert(0, os.path.join(exedir, '../lib/redo')) import $fix EOF $INSTALL -m 0755 install.wrapper $BINDIR/$d