run-in-tempdir 185 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 daemons scripts lib tools test $tmpdir
9 10 11
mv $tmpdir/lib $tmpdir/ganeti

cd $tmpdir && "$@"