mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 15:03:44 +02:00
lib.sh: move singletree() to git.sh
it is primarily used there, and then in mk, but only after git.sh is sourced. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -66,6 +66,15 @@ git_prep()
|
|||||||
mv "$tmpgit" "$_loc" || $err "git_prep: !mv $tmpgit $_loc"
|
mv "$tmpgit" "$_loc" || $err "git_prep: !mv $tmpgit $_loc"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# return 0 if project is single-tree, otherwise 1
|
||||||
|
# e.g. coreboot is multi-tree, so 1
|
||||||
|
singletree()
|
||||||
|
{
|
||||||
|
for targetfile in "config/${1}/"*/target.cfg; do
|
||||||
|
[ -e "$targetfile" ] && [ -f "$targetfile" ] && return 1; :
|
||||||
|
done; :
|
||||||
|
}
|
||||||
|
|
||||||
fetch_submodule()
|
fetch_submodule()
|
||||||
{
|
{
|
||||||
mcfgdir="$mdir/${1##*/}"; eval \
|
mcfgdir="$mdir/${1##*/}"; eval \
|
||||||
|
|||||||
@@ -42,15 +42,6 @@ rmgit()
|
|||||||
) || $err "Cannot remove .git/.gitmodules in $1"
|
) || $err "Cannot remove .git/.gitmodules in $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# return 0 if project is single-tree, otherwise 1
|
|
||||||
# e.g. coreboot is multi-tree, so 1
|
|
||||||
singletree()
|
|
||||||
{
|
|
||||||
for targetfile in "config/${1}/"*/target.cfg; do
|
|
||||||
[ -e "$targetfile" ] && [ -f "$targetfile" ] && return 1; :
|
|
||||||
done; :
|
|
||||||
}
|
|
||||||
|
|
||||||
# can grab from the internet, or copy locally.
|
# can grab from the internet, or copy locally.
|
||||||
# if copying locally, it can only copy a file.
|
# if copying locally, it can only copy a file.
|
||||||
xbmkget()
|
xbmkget()
|
||||||
|
|||||||
Reference in New Issue
Block a user