run-in-tempdir 221 Bytes
Newer Older
1 2 3 4 5 6 7
#!/bin/bash

set -e

tmpdir=$(mktemp -d -t gntbuild.XXXXXXXX)
trap "rm -rf $tmpdir" EXIT

8
cp -r autotools daemons scripts lib tools test $tmpdir
9 10
mv $tmpdir/lib $tmpdir/ganeti

Iustin Pop's avatar
Iustin Pop committed
11
cd $tmpdir && GANETI_TEMP_DIR="$tmpdir" "$@"