summaryrefslogtreecommitdiff
path: root/baserock-bootstrap
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-03-06 09:29:57 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-03-06 09:29:57 +0000
commitbc8e20fb15cf96d37c3e2d46731511569d9ea136 (patch)
tree66f63747743bd3556ca5140b0c535e80ba7f5357 /baserock-bootstrap
parentc972e5747b01767625f9754a31fed50f8ee61fca (diff)
downloadmorph-bc8e20fb15cf96d37c3e2d46731511569d9ea136.tar.gz
bootstrap: don't move cache if already moved
This makes it easier to re-run the bootstrap script to resume building.
Diffstat (limited to 'baserock-bootstrap')
-rwxr-xr-xbaserock-bootstrap8
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