mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
unify dependencies scripts
the unified logic is so small that i simply added it to the main "build" script commands are identical. example: ./build dependencies debian Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -40,10 +40,13 @@ main()
|
||||
buildpath="./resources/scripts/${0##*/}"
|
||||
|
||||
mode="${1}"
|
||||
./.gitcheck
|
||||
if [ "${mode}" != "dependencies" ]; then
|
||||
./resources/scripts/misc/versioncheck
|
||||
if [ "${mode}" = "dependencies" ]; then
|
||||
install_dependencies $@ || die "Could not install dependencies"
|
||||
exit 0
|
||||
fi
|
||||
./.gitcheck
|
||||
[ "${mode}" != "dependencies" ] && \
|
||||
./resources/scripts/misc/versioncheck
|
||||
if [ "${mode}" = help ]; then
|
||||
usage $0
|
||||
exit 0
|
||||
@@ -80,6 +83,19 @@ main()
|
||||
./.gitcheck clean
|
||||
}
|
||||
|
||||
install_dependencies()
|
||||
{
|
||||
[ -f "resources/dependencies/${2}" ] || die "Unsupported target"
|
||||
|
||||
aur_notice=""
|
||||
. "resources/dependencies/${2}"
|
||||
|
||||
${pkg_add} ${pkglist} || die "Error installing dependencies"
|
||||
[ "${aur_notice}" != "" ] && \
|
||||
printf "You must install these AUR packages: %s\n" \
|
||||
"${aur_notice}" 1>&2
|
||||
}
|
||||
|
||||
# Takes exactly one mode as parameter
|
||||
listoptions()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user