projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gnt-* {add,list,remove}-tags: Unify options
[ganeti-local]
/
autotools
/
run-in-tempdir
diff --git
a/autotools/run-in-tempdir
b/autotools/run-in-tempdir
index
31a696c
..
e32f863
100755
(executable)
--- a/
autotools/run-in-tempdir
+++ b/
autotools/run-in-tempdir
@@
-1,5
+1,8
@@
#!/bin/bash
#!/bin/bash
+# Helper for running things in a temporary directory; used for docs
+# building, unittests, etc.
+
set -e
tmpdir=$(mktemp -d -t gntbuild.XXXXXXXX)
set -e
tmpdir=$(mktemp -d -t gntbuild.XXXXXXXX)
@@
-7,5
+10,9
@@
trap "rm -rf $tmpdir" EXIT
cp -r autotools daemons scripts lib tools test $tmpdir
mv $tmpdir/lib $tmpdir/ganeti
cp -r autotools daemons scripts lib tools test $tmpdir
mv $tmpdir/lib $tmpdir/ganeti
+mkdir -p $tmpdir/htools
+if [ -e htools/test ]; then
+ cp -p htools/test $tmpdir/htools/
+fi
cd $tmpdir && GANETI_TEMP_DIR="$tmpdir" "$@"
cd $tmpdir && GANETI_TEMP_DIR="$tmpdir" "$@"