mirror of
https://github.com/pygos/build.git
synced 2024-11-13 06:57:11 +01:00
ffacb26218
Instead of having a "depends" file with a list of packages, add a "DEPENDS" variable to the build script. Generate the rootfs dependencies from a config file stored in the cfg directory. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
27 lines
499 B
Bash
Executable file
27 lines
499 B
Bash
Executable file
dependencies_recursive() {
|
|
local NAME="$1"
|
|
local PKGDIR="$2"
|
|
|
|
unset -f build deploy prepare
|
|
unset -v VERSION TARBALL URL SRCDIR SHA256SUM DEPENDS
|
|
source "$SCRIPTDIR/$PKGDIR/$NAME/build"
|
|
|
|
local depends="$DEPENDS"
|
|
|
|
if [ ! -z "$depends" ]; then
|
|
for DEP in $depends; do
|
|
echo "$NAME $DEP"
|
|
done
|
|
|
|
for DEP in $depends; do
|
|
dependencies_recursive "$DEP" "$PKGDIR"
|
|
done
|
|
fi
|
|
}
|
|
|
|
dependencies() {
|
|
local NAME="$1"
|
|
local PKGDIR="$2"
|
|
|
|
dependencies_recursive "$NAME" "$PKGDIR" | tsort | tac
|
|
}
|