mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
.gitcheck: continue if no .git (don't break)
the user may have re-downloaded a coreboot tree, in a release. this is supported. therefore, some may have .git, and some will not Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -29,7 +29,7 @@ set_placeholders()
|
|||||||
[ -d coreboot ] || return 0
|
[ -d coreboot ] || return 0
|
||||||
for x in coreboot/*; do
|
for x in coreboot/*; do
|
||||||
[ -d "${x}" ] || continue
|
[ -d "${x}" ] || continue
|
||||||
[ -e "${x}/.git" ] || break
|
[ -e "${x}/.git" ] || continue
|
||||||
(
|
(
|
||||||
cd "${x}"
|
cd "${x}"
|
||||||
set_git_credentials
|
set_git_credentials
|
||||||
@@ -55,7 +55,7 @@ clean()
|
|||||||
[ -d coreboot ] || return 0
|
[ -d coreboot ] || return 0
|
||||||
for x in coreboot/*; do
|
for x in coreboot/*; do
|
||||||
[ -d "${x}" ] || continue
|
[ -d "${x}" ] || continue
|
||||||
[ -e "${x}/.git" ] || break
|
[ -e "${x}/.git" ] || continue
|
||||||
(
|
(
|
||||||
cd "${x}"
|
cd "${x}"
|
||||||
unset_placeholders
|
unset_placeholders
|
||||||
|
|||||||
@@ -37,11 +37,12 @@ main()
|
|||||||
[ $# -lt 1 ] && err "Too few arguments. Try: ${0} help"
|
[ $# -lt 1 ] && err "Too few arguments. Try: ${0} help"
|
||||||
|
|
||||||
buildpath="./resources/scripts/${0##*/}"
|
buildpath="./resources/scripts/${0##*/}"
|
||||||
|
|
||||||
mode="${1}"
|
mode="${1}"
|
||||||
./.gitcheck
|
|
||||||
|
./.gitcheck || err "/.gitcheck call from main, in /lbmk"
|
||||||
[ "${mode}" = "help" ] && usage ${0} && exit 0
|
[ "${mode}" = "help" ] && usage ${0} && exit 0
|
||||||
[ $# -lt 2 ] && usage ${0} && exit 1
|
[ $# -lt 2 ] && usage ${0} && exit 1
|
||||||
|
|
||||||
if [ "${mode}" = "dependencies" ]; then
|
if [ "${mode}" = "dependencies" ]; then
|
||||||
install_dependencies $@ || err "Could not install dependencies"
|
install_dependencies $@ || err "Could not install dependencies"
|
||||||
exit 0
|
exit 0
|
||||||
@@ -73,7 +74,7 @@ main()
|
|||||||
"${buildpath}/${mode}/${option}" $@ || err "lbmk error"
|
"${buildpath}/${mode}/${option}" $@ || err "lbmk error"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
./.gitcheck clean
|
./.gitcheck clean || err "/.gitcheck clean call from main, in /lbmk"
|
||||||
}
|
}
|
||||||
|
|
||||||
install_dependencies()
|
install_dependencies()
|
||||||
|
|||||||
Reference in New Issue
Block a user