out-of-tree build: generate ./run from template, fix image checks
[libguestfs.git] / run.in
diff --git a/run b/run.in
similarity index 96%
rename from run
rename to run.in
index 2945315..d7b91d4 100755 (executable)
--- a/run
+++ b/run.in
 #----------------------------------------------------------------------
 
 # Find this script.
 #----------------------------------------------------------------------
 
 # Find this script.
-run=$(readlink -f "$0")
-b=$(dirname "$run")
+b=@abs_builddir@
 
 # Set TMPDIR so the appliance doesn't conflict with globally
 # installed libguestfs.
 
 # Set TMPDIR so the appliance doesn't conflict with globally
 # installed libguestfs.
-export TMPDIR=$b
+export TMPDIR="$b"
 
 # Set local environment relative to this script.
 export LD_LIBRARY_PATH="$b/src/.libs"
 
 # Set local environment relative to this script.
 export LD_LIBRARY_PATH="$b/src/.libs"