summaryrefslogtreecommitdiff
path: root/script/update/trees
diff options
context:
space:
mode:
Diffstat (limited to 'script/update/trees')
-rwxr-xr-xscript/update/trees20
1 files changed, 4 insertions, 16 deletions
diff --git a/script/update/trees b/script/update/trees
index 4c969df7..da42d200 100755
--- a/script/update/trees
+++ b/script/update/trees
@@ -44,11 +44,7 @@ main()
build_projects()
{
[ $# -gt 0 ] && x_ ./update trees $_f $@
-
- if [ "${mode}" = "fetch" ]; then
- fetch_project_repo
- return 0
- fi
+ [ "$mode" = "fetch" ] && eval "fetch_project_repo; return 0;"
codedir="src/${project}"
[ -d "$codedir" ] || x_ ./update trees -f "$project"
@@ -86,7 +82,6 @@ build_targets()
[ $# -gt 0 ] && targets=$@
[ -z "$mode" ] && x_ mkdir -p "$elfdir"
-
handle_targets
}
@@ -111,10 +106,8 @@ handle_defconfig()
{
handle_src_tree "$target" || return 0
- if [ "$target1" = "utils" ] && [ "$project" = "coreboot" ]; then
- handle_coreboot_utils "$tree"
- return 0
- fi
+ [ "$target1" = "utils" ] && [ "$project" = "coreboot" ] && \
+ eval "handle_coreboot_utils \"$tree\"; return 0"
for y in "${target_dir}/config"/*; do
[ -f "$y" ] || continue
@@ -133,11 +126,7 @@ handle_defconfig()
handle_src_tree()
{
target_dir="${cfgsdir}/${target}"
-
- if [ "$mode" = "fetch" ]; then
- fetch_project_trees
- return 1
- fi
+ [ "$mode" = "fetch" ] && eval "fetch_project_trees; return 1;"
x_ mkdir -p "${elfdir}/${target}"
eval "$(setvars "" xarch xlang tree)"
@@ -236,7 +225,6 @@ copy_elf()
[ ! -f "${codedir}/$f" ] || \
x_ cp "${codedir}/${f}" "$dest_dir"
done < "$listfile"
-
x_ make clean -C "$codedir"
}