1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-05 03:27:10 +01:00
build/util/depends.sh

28 lines
499 B
Bash
Raw Normal View History

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
}