2017-12-09 21:51:48 +01:00
|
|
|
dependencies_recursive() {
|
|
|
|
local NAME="$1"
|
|
|
|
local PKGDIR="$2"
|
|
|
|
|
2018-01-24 12:52:41 +01:00
|
|
|
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
|
2017-12-09 21:51:48 +01:00
|
|
|
echo "$NAME $DEP"
|
2018-01-24 12:52:41 +01:00
|
|
|
done
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-01-24 12:52:41 +01:00
|
|
|
for DEP in $depends; do
|
2017-12-09 21:51:48 +01:00
|
|
|
dependencies_recursive "$DEP" "$PKGDIR"
|
2018-01-24 12:52:41 +01:00
|
|
|
done
|
2017-12-09 21:51:48 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies() {
|
2018-01-24 11:18:56 +01:00
|
|
|
local NAME="$1"
|
|
|
|
local PKGDIR="$2"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-01-24 11:18:56 +01:00
|
|
|
dependencies_recursive "$NAME" "$PKGDIR" | tsort | tac
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|