summaryrefslogtreecommitdiff
path: root/script/update/project/trees
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/trees
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/trees')
-rwxr-xr-xscript/update/project/trees23
1 files changed, 12 insertions, 11 deletions
diff --git a/script/update/project/trees b/script/update/project/trees
index 29004760..4b25d5b9 100755
--- a/script/update/project/trees
+++ b/script/update/project/trees
@@ -15,13 +15,13 @@ eval "$(setvars "" _target tree rev project cfgsdir _xm)"
main()
{
- printf "Downloading %s and applying patches\n" ${project}
-
[ -z "${1}" ] && err "project name not specified"
- project="${1}" && shift 1
+ project="${1#src/}" && shift 1
configure_targets $@
+ printf "Downloading %s and applying patches\n" ${project}
+
for x in ${targets}; do
x_ rm -f "${cfgsdir}/"*/seen
download_for_target "${x}"
@@ -45,8 +45,9 @@ download_for_target()
_target="${1}"
fetch_config
- [ -d "${project}/${tree}" ] && printf "download/%s %s (%s): exists\n" \
- "${project}" "${tree}" "${_target}" 1>&2 && return 0
+ [ -d "src/${project}/${tree}" ] && \
+ printf "download/%s %s (%s): exists\n" \
+ "${project}" "${tree}" "${_target}" 1>&2 && return 0
fetch_from_upstream
prepare_new_tree
@@ -83,9 +84,9 @@ check_config_for_target()
fetch_from_upstream()
{
- [ -d "${project}" ] || x_ mkdir -p "${project}"
- [ -d "${project}/${project}" ] && return 0
+ [ -d "src/${project}/${project}" ] && return 0
+ x_ mkdir -p "src/${project}"
x_ ./update project repo "${project}"
}
@@ -93,14 +94,14 @@ prepare_new_tree()
{
printf "Creating %s tree %s (%s)\n" "${project}" "${tree}" "${_target}"
- x_ cp -R "${project}/${project}" "${project}/${tree}"
- x_ git_reset_rev "${project}/${tree}" "${rev}" "err"
+ x_ cp -R "src/${project}/${project}" "src/${project}/${tree}"
+ x_ git_reset_rev "src/${project}/${tree}" "${rev}" "err"
(
- x_ cd "${project}/${tree}"
+ x_ cd "src/${project}/${tree}"
git submodule update --init --checkout || \
err "prepare_new_tree ${project}/${tree}: can't update git modules"
)
- git_am_patches "${PWD}/${project}/${tree}" \
+ git_am_patches "${PWD}/src/${project}/${tree}" \
"${PWD}/${cfgsdir}/${tree}/patches" "err"
}