diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-19 15:43:19 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-19 15:43:19 +0000 |
commit | d10837f89c54db9da7fe0772cb59731f9713afd2 (patch) | |
tree | 26eda78c7fa694427850aa4f6886a0685b84341f /run-bootstrap-in-chroot | |
parent | 8681a945994c12684a605ed638722f10fbc00db8 (diff) | |
download | morph-d10837f89c54db9da7fe0772cb59731f9713afd2.tar.gz |
Allow the bootstrap work area to be inside the morph source tree
This will be useful for Jenkins jobs, so that we can have the bootstrap
test job build in the Jenkins workarea. And that is useful for artifact
archival and inspecting the bootstrap work tree after a failure via
the Jenkins interface.
Diffstat (limited to 'run-bootstrap-in-chroot')
-rwxr-xr-x | run-bootstrap-in-chroot | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/run-bootstrap-in-chroot b/run-bootstrap-in-chroot index 9a669015..8b1058b5 100755 --- a/run-bootstrap-in-chroot +++ b/run-bootstrap-in-chroot @@ -31,7 +31,13 @@ update_morph() cp baserock-bootstrap "$dir/." # update bootstrap script rm -rf "$dir/tree/baserock/gits/morph" mkdir -p "$dir/tree/baserock/gits/morph" - cp -r . "$dir/tree/baserock/gits/morph/." + + # Copy everything except the target directory into the target directory. + # The point is to be able to keep the working area for a bootstrap inside + # the morph source directory. This is useful for Jenkins jobs. + local base=$(basename $(basename "$dir")) + find . -mindepth 1 -maxdepth 1 ! -name "$base" \ + -exec cp -av '{}' "$dir/tree/baserock/gits/morph" ';' } run_pass() |