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.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/mk/buildlink3/show-buildlink3.sh b/mk/buildlink3/show-buildlink3.sh
new file mode 100644
index 00000000000..1d2255158d2
--- /dev/null
+++ b/mk/buildlink3/show-buildlink3.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $NetBSD: show-buildlink3.sh,v 1.1 2006/07/08 23:11:17 jlam 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.
+#
+
+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"
+ shift
+done