mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-19 19:23:24 +02:00
tree.sh: rename function and remove comments
the new function names make the comments redundant. the code is now self-explanatory. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+6
-12
@@ -153,7 +153,7 @@ configure_project()
|
|||||||
|
|
||||||
mdir="$xbmkpwd/config/submodule/$project"
|
mdir="$xbmkpwd/config/submodule/$project"
|
||||||
[ -n "$tree" ] && mdir="$mdir/$tree"
|
[ -n "$tree" ] && mdir="$mdir/$tree"
|
||||||
[ -f "CHANGELOG" ] || check_project_hashes
|
[ -f "CHANGELOG" ] || delete_old_project_files
|
||||||
|
|
||||||
if [ "$do_make" = "n" ]; then
|
if [ "$do_make" = "n" ]; then
|
||||||
[ -f "CHANGELOG" ] || fetch_${cmd#build_}
|
[ -f "CHANGELOG" ] || fetch_${cmd#build_}
|
||||||
@@ -173,23 +173,17 @@ build_dependencies()
|
|||||||
done; :
|
done; :
|
||||||
}
|
}
|
||||||
|
|
||||||
# get sha512sums of project-related files, concatenate and then
|
delete_old_project_files()
|
||||||
# get a sha512sum of *that*; cache and re-check to detect changes
|
|
||||||
check_project_hashes()
|
|
||||||
{
|
{
|
||||||
# delete project source tree, if it changes; works for both
|
project_up_to_date hash "$tree" badhash "$datadir" "$configdir/$tree" \
|
||||||
# single and multi-tree, since "tree" will be blank on single-tree
|
|
||||||
check_hashes hash "$tree" badhash "$datadir" "$configdir/$tree" \
|
|
||||||
"$mdir" || x_ rm -Rf "src/$project/$tree" "elf/$project/$tree"; :
|
"$mdir" || x_ rm -Rf "src/$project/$tree" "elf/$project/$tree"; :
|
||||||
|
|
||||||
# check only the given target; delete only the target build
|
|
||||||
# if that's all that changed (not applicable to single-tree)
|
|
||||||
singletree "$project" || [ -z "$target" ] || [ "$target" = "$tree" ] \
|
singletree "$project" || [ -z "$target" ] || [ "$target" = "$tree" ] \
|
||||||
|| check_hashes tghash "$target" badtghash "$configdir/$target" \
|
|| project_up_to_date tghash "$target" badtghash \
|
||||||
|| x_ rm -Rf "elf/$project/$tree/$target"; :
|
"$configdir/$target" || x_ rm -Rf "elf/$project/$tree/$target"; :
|
||||||
}
|
}
|
||||||
|
|
||||||
check_hashes()
|
project_up_to_date()
|
||||||
{
|
{
|
||||||
eval "`setvars "" old_hash hash`"
|
eval "`setvars "" old_hash hash`"
|
||||||
hashname="$1"
|
hashname="$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user