2024-07-03 22:35:33 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
reverse_deps(){
|
|
|
|
echo $1
|
|
|
|
case "$1" in
|
|
|
|
thyme)
|
|
|
|
echo rosemary
|
|
|
|
;;
|
|
|
|
enables-wan)
|
|
|
|
echo wattle # controlled
|
|
|
|
;;
|
2024-07-08 20:13:49 +00:00
|
|
|
modeswitch)
|
|
|
|
reverse_deps atz
|
|
|
|
;;
|
|
|
|
atz)
|
|
|
|
echo ifconfig
|
|
|
|
;;
|
2024-07-03 22:35:33 +00:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
deps(){
|
|
|
|
echo $1
|
|
|
|
case "$1" in
|
|
|
|
rosemary)
|
|
|
|
echo thyme;;
|
2024-07-08 20:13:49 +00:00
|
|
|
wattle)
|
|
|
|
echo enables-wan;;
|
|
|
|
atz)
|
|
|
|
echo modeswitch;;
|
|
|
|
ifconfig)
|
|
|
|
deps atz;;
|
2024-07-03 22:35:33 +00:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
if test "$1" = "-d" && test "$2" = "all-dependencies"; then
|
|
|
|
shift; shift;
|
|
|
|
reverse_deps $@
|
|
|
|
elif test "$1" = "all-dependencies"; then
|
|
|
|
shift;
|
|
|
|
deps $@
|
|
|
|
fi
|