about summary refs log tree commit diff
path: root/xsubpkg
diff options
context:
space:
mode:
Diffstat (limited to 'xsubpkg')
-rwxr-xr-xxsubpkg10
1 files changed, 8 insertions, 2 deletions
diff --git a/xsubpkg b/xsubpkg
index 1cb9066..ce236cf 100755
--- a/xsubpkg
+++ b/xsubpkg
@@ -1,6 +1,12 @@
 #!/bin/sh
-# xsubpkg PKG - lists all subpackages of a package
+# xsubpkg [-m] PKG - lists all subpackages of a package
+
+followsym="-L"
+
+case "$1" in
+	-m) followsym="-P"; shift
+esac
 
 PKG=$1
 cd $(xdistdir)
-find -L srcpkgs -maxdepth 2 -samefile srcpkgs/"$PKG"/template | cut -d/ -f 2
+find $followsym srcpkgs -maxdepth 2 -samefile srcpkgs/"$PKG"/template | cut -d/ -f 2