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
David Oberhollenzer 78c616ca27 Simplify dependency handling
- dependencies() accepts a single package name instead of a list.
   Is used only that way anwayway.
 - Remove most temporary packge lists

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-01-30 14:02:09 +01:00

21 lines
430 B
Bash
Executable file

dependencies_recursive() {
local NAME="$1"
local PKGDIR="$2"
if [ -e "$SCRIPTDIR/$PKGDIR/$NAME/depends" ]; then
while read DEP; do
echo "$NAME $DEP"
done < "$SCRIPTDIR/$PKGDIR/$NAME/depends"
while read DEP; do
dependencies_recursive "$DEP" "$PKGDIR"
done < "$SCRIPTDIR/$PKGDIR/$NAME/depends"
fi
}
dependencies() {
local NAME="$1"
local PKGDIR="$2"
dependencies_recursive "$NAME" "$PKGDIR" | tsort | tac
}