1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-14 07:27:10 +01:00
build/util/depends.sh
David Oberhollenzer ffacb26218 Remove depends file
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>
2018-01-30 14:02:09 +01:00

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
}