File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh -ef
2
+ # Display a package's dependencies in repositories
3
+
4
+ pkg=${1:- " ${PWD##*/ } " }
5
+
6
+ kiss search " $pkg " > /dev/null || {
7
+ printf ' usage: kiss-depends [pkg]\n' >&2
8
+ exit 1
9
+ }
10
+
11
+ kiss search " $pkg " | while read -r pkgpath; do
12
+ printf ' => %s\n' " $pkgpath "
13
+ while read -r dep mak || [ " $dep " ]; do
14
+ printf ' %s%s\n' " $dep " " ${mak: + " $mak " } "
15
+ done 2> /dev/null < " $pkgpath /depends"
16
+ done
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Display packages in all repositories which depend on a package
3
+
4
+ [ " $1 " ] || set -- " ${PWD##*/ } "
5
+
6
+ suffix () {
7
+ case " $1 " in * " $2 " ) return 0; esac ; return 1
8
+ }
9
+
10
+ IFS=:
11
+ for repo in $KISS_PATH ; do
12
+ # remove trailing slashes
13
+ while suffix " $repo " /; do repo=" ${repo%/ } " ; done
14
+ gitdir=" $( git -C " $repo " rev-parse --show-toplevel 2> /dev/null || echo " $repo " ) "
15
+ case " $gitdir " in " $repo " ) unset prefix ;; * ) prefix=" ${repo##*/ } /" ;; esac
16
+
17
+ cd " $gitdir /.." || continue
18
+ grep -E " ^$1 ([[:space:]]|$)" -- " ${gitdir##*/ } /$prefix " * /depends 2> /dev/null || :
19
+ done
You can’t perform that action at this time.
0 commit comments