diff options
author | Leah Rowe <leah@libreboot.org> | 2023-05-15 03:24:19 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-05-15 03:24:19 +0100 |
commit | 2d69072a09d7041bf3c8566a1151f92d56b8c87e (patch) | |
tree | a3bb5889a11d073b14e8b4c9961634d4b261ed9a /resources/scripts | |
parent | c17423e475802da6919edbabaad894117ae4b7e8 (diff) |
download/coreboot: clone upstream via ./gitclone
coreboot trees/patching is still handled
specifically by "./download coreboot"
command now available in lbmk:
./gitclone coreboot
this *only* creates the directory at:
coreboot/coreboot
this directory is never used in builds.
it is only used by download/coreboot to
create patched trees for each mainboard
Diffstat (limited to 'resources/scripts')
-rwxr-xr-x | resources/scripts/download/coreboot | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/resources/scripts/download/coreboot b/resources/scripts/download/coreboot index 88692e53..2410880a 100755 --- a/resources/scripts/download/coreboot +++ b/resources/scripts/download/coreboot @@ -89,39 +89,19 @@ download_coreboot_for_board() return 0 fi - [ ! -d coreboot ] && mkdir "coreboot/" - [ ! -d coreboot ] && return 1 + [ ! -d coreboot ] && \ + mkdir -p coreboot + [ ! -d coreboot ] && \ + exit 1 + [ -d coreboot/coreboot ] && \ + rm -Rf coreboot/coreboot + [ -d coreboot/coreboot ] && \ + exit 1 + ./gitclone coreboot || \ + exit 1 cd "coreboot/" - [ ! -d coreboot/.git ] && [ -d coreboot ] && \ - rm -Rf coreboot/ - - if [ ! -d coreboot ]; then - printf "Download coreboot from upstream:\n" - git clone https://review.coreboot.org/coreboot \ - || rm -Rf coreboot - if [ ! -d coreboot ]; then - printf "WARNING: Upstream failed. Trying backup:\n" - git clone https://github.com/coreboot/coreboot.git \ - || rm -Rf coreboot - fi - if [ ! -d coreboot ]; then - printf "ERROR: download/coreboot:" - printf " Problem with git-clone. Network issue?\n" - cd ../ - return 1 - fi - else - ( cd coreboot/; git pull || touch ../build_error ) - if [ -f ../build_error ]; then - printf "ERROR: download/coreboot:" - printf " Problem with git-pull. Network issue?\n" - cd ../ - return 1 - fi - fi - cp -R coreboot "${cbtree}" || touch ../build_error if [ -d ../build_error ]; then printf "ERROR: download/coreboot: Unable to copy directory." |