diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-06 09:29:57 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-06 09:29:57 +0000 |
commit | bc8e20fb15cf96d37c3e2d46731511569d9ea136 (patch) | |
tree | 66f63747743bd3556ca5140b0c535e80ba7f5357 | |
parent | c972e5747b01767625f9754a31fed50f8ee61fca (diff) | |
download | morph-bc8e20fb15cf96d37c3e2d46731511569d9ea136.tar.gz |
bootstrap: don't move cache if already moved
This makes it easier to re-run the bootstrap script to
resume building.
-rwxr-xr-x | baserock-bootstrap | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/baserock-bootstrap b/baserock-bootstrap index 585b83b5..4fe0a076 100755 --- a/baserock-bootstrap +++ b/baserock-bootstrap @@ -970,9 +970,11 @@ pass3_get_sources_with_morph_in_chroot() # but the cached chunks may be invalid, so # move them away cd "$LFS/baserock/gits/morph" - mv "$LFS/baserock/cache" "$LFS/baserock/cache.pass2" - mkdir -p "$LFS/baserock/cache" - mv "$LFS/baserock/cache.pass2/gits" "$LFS/baserock/cache/gits" + if [ ! -e "$LFS/baserock/cache.pass2" ]; then + mv "$LFS/baserock/cache" "$LFS/baserock/cache.pass2" + mkdir -p "$LFS/baserock/cache" + mv "$LFS/baserock/cache.pass2/gits" "$LFS/baserock/cache/gits" + fi cat <<EOF > "$LFS/baserock/build.sh" #!/bin/bash |