mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +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"
|
||||
[ -n "$tree" ] && mdir="$mdir/$tree"
|
||||
[ -f "CHANGELOG" ] || check_project_hashes
|
||||
[ -f "CHANGELOG" ] || delete_old_project_files
|
||||
|
||||
if [ "$do_make" = "n" ]; then
|
||||
[ -f "CHANGELOG" ] || fetch_${cmd#build_}
|
||||
@@ -173,23 +173,17 @@ build_dependencies()
|
||||
done; :
|
||||
}
|
||||
|
||||
# get sha512sums of project-related files, concatenate and then
|
||||
# get a sha512sum of *that*; cache and re-check to detect changes
|
||||
check_project_hashes()
|
||||
delete_old_project_files()
|
||||
{
|
||||
# delete project source tree, if it changes; works for both
|
||||
# single and multi-tree, since "tree" will be blank on single-tree
|
||||
check_hashes hash "$tree" badhash "$datadir" "$configdir/$tree" \
|
||||
project_up_to_date hash "$tree" badhash "$datadir" "$configdir/$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" ] \
|
||||
|| check_hashes tghash "$target" badtghash "$configdir/$target" \
|
||||
|| x_ rm -Rf "elf/$project/$tree/$target"; :
|
||||
|| project_up_to_date tghash "$target" badtghash \
|
||||
"$configdir/$target" || x_ rm -Rf "elf/$project/$tree/$target"; :
|
||||
}
|
||||
|
||||
check_hashes()
|
||||
project_up_to_date()
|
||||
{
|
||||
eval "`setvars "" old_hash hash`"
|
||||
hashname="$1"
|
||||
|
||||
Reference in New Issue
Block a user