summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinclude/err.sh1
-rwxr-xr-xinclude/option.sh4
-rwxr-xr-xscript/update/trees20
3 files changed, 6 insertions, 19 deletions
diff --git a/include/err.sh b/include/err.sh
index 3c596b17..cab81d02 100755
--- a/include/err.sh
+++ b/include/err.sh
@@ -53,7 +53,6 @@ check_project()
p_="x_ printf \"%s\\n\" \"\$$p\" > $p"
eval "x$p_ || $p_"
done
-
export LOCALVERSION="-${projectname}-${version%%-*}"
}
diff --git a/include/option.sh b/include/option.sh
index 31411423..8367d447 100755
--- a/include/option.sh
+++ b/include/option.sh
@@ -46,9 +46,9 @@ scan_config()
set ${line} 1>/dev/null 2>/dev/null || :
if [ "${1%:}" = "depend" ]; then
depend="${depend} ${2}"
- continue
+ else
+ eval "${1%:}=\"${2}\""
fi
- eval "${1%:}=\"${2}\""
done << EOF
$(eval "awk '${awkstr}' \"${revfile}\"")
EOF
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"
}