summaryrefslogtreecommitdiff
path: root/pkgthing/search
diff options
context:
space:
mode:
Diffstat (limited to 'pkgthing/search')
-rw-r--r--pkgthing/search19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgthing/search b/pkgthing/search
new file mode 100644
index 0000000..a9aade0
--- /dev/null
+++ b/pkgthing/search
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+pkg=$1
+src=${2-*}
+
+printname() {
+ name=$1
+ echo -n "$name"
+ if [ -L "${name%/}" ]; then
+ echo -n ' -> '
+ printname `readlink "${name%/}"`
+ else
+ echo '' # or, rather: putchar('\n');
+ fi
+}
+
+for i in $src/*/"$pkg/" $src/*/"$pkg.README"; do
+ if [ -e "$i" ]; then printname "$i"; fi
+done