summaryrefslogtreecommitdiff
path: root/mk/buildlink3/show-buildlink3.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mk/buildlink3/show-buildlink3.sh')
-rw-r--r--mk/buildlink3/show-buildlink3.sh24
1 files changed, 11 insertions, 13 deletions
diff --git a/mk/buildlink3/show-buildlink3.sh b/mk/buildlink3/show-buildlink3.sh
index 1d2255158d2..1fa109ffdea 100644
--- a/mk/buildlink3/show-buildlink3.sh
+++ b/mk/buildlink3/show-buildlink3.sh
@@ -1,23 +1,21 @@
#!/bin/sh
#
-# $NetBSD: show-buildlink3.sh,v 1.1 2006/07/08 23:11:17 jlam Exp $
+# $NetBSD: show-buildlink3.sh,v 1.2 2009/03/20 19:25:01 joerg Exp $
#
# This script is a helper for the show-buildlink3 target and outputs
-# the arguments, each on a new line with any leading "+" signs replaced
-# with four spaces.
+# the arguments as tree.
#
while test $# -gt 0; do
pkg="$1"
- pkg="${pkg#+}"
- prefix=
- stripped=no
- while test $stripped = no; do
- case $pkg in
- +*) prefix=" $prefix"; pkg="${pkg#+}"; stripped=no ;;
- *) stripped=yes ;;
- esac
- done
- echo "$prefix$pkg"
+ case $pkg in
+ -*)
+ indentation=${indendation# }
+ ;;
+ *)
+ echo "${indentation}${pkg}"
+ indentation="${indentation} "
+ ;;
+ esac
shift
done