summaryrefslogtreecommitdiff
path: root/script/update/project/repo
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-06 22:59:36 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-07 00:11:21 +0100
commit4e39d5a5a808b0d59c6fb3426e1d9bc0195d6b08 (patch)
tree26ccd90ebffb18c70132e6192f27bac1c4c3522c /script/update/project/repo
parent965b6a7ed73f1dbd78a353c83b99a88b50c86f38 (diff)
put all src downloads under src/
build/release/src was partly re-written to accomodate this memtest86plus was patched to have a central Makefile, and lbmk modified to use that, rather than mess with build32 and build64. the central Makefile just builds both targets or cleans both targets Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update/project/repo')
-rwxr-xr-xscript/update/project/repo8
1 files changed, 5 insertions, 3 deletions
diff --git a/script/update/project/repo b/script/update/project/repo
index 71c3940c..df522edc 100755
--- a/script/update/project/repo
+++ b/script/update/project/repo
@@ -16,7 +16,7 @@ main()
[ $# -gt 0 ] || fail "no argument given"
[ -z "${1+x}" ] && fail 'main(): name not set'
- name=${1}
+ name=${1#src/}
scan_config "${name}" "config/git" "fail"
verify_config
@@ -40,6 +40,9 @@ clone_project()
xx_ rm -Rf "${tmp_dir}"
xx_ mkdir -p "${tmp_dir%/*}"
+ loc="${loc#src/}"
+ loc="src/${loc}"
+
git clone ${url} "${tmp_dir}" || git clone ${bkup_url} "${tmp_dir}" || \
fail "clone_project: could not download ${name}"
git_reset_rev "${tmp_dir}" "${rev}" "fail" || \
@@ -47,8 +50,7 @@ clone_project()
git_am_patches "${tmp_dir}" "${PWD}/config/${name}/patches" "fail" || \
fail "clone_project ${loc}/: cannot apply patches"
- [ ! -d "${loc}" ] || \
- xx_ rm -Rf "${loc}"
+ xx_ rm -Rf "${loc}"
[ "${loc}" = "${loc%/*}" ] || xx_ mkdir -p ${loc%/*}
xx_ mv "${tmp_dir}" "${loc}"
}