| 1 | #!/usr/bin/env bash
|
| 2 | #
|
| 3 | # Find dependencies of shell scripts in this repo.
|
| 4 | # This is a good set of repos for oilshell.org/src.
|
| 5 | #
|
| 6 | # Usage:
|
| 7 | # ./deps.sh <function name>
|
| 8 |
|
| 9 | set -o nounset
|
| 10 | set -o pipefail
|
| 11 | set -o errexit
|
| 12 |
|
| 13 | _this-repo() {
|
| 14 | # NOTE: copied from test/wild.sh oil-manifest.
|
| 15 | for name in \
|
| 16 | configure install *.sh {benchmarks,build,devtools,metrics,misc,test,opy}/*.sh; do
|
| 17 | bin/oshc deps $name
|
| 18 | done
|
| 19 | }
|
| 20 |
|
| 21 | # Top:
|
| 22 | # mkdir, cat, xargs, basename, wc.
|
| 23 | #
|
| 24 | # There are some errors due to separate modules too, like csv2html, fail, etc.
|
| 25 |
|
| 26 | this-repo() {
|
| 27 | local tmp=_tmp/this-repo-deps.txt
|
| 28 | _this-repo > $tmp
|
| 29 | sort $tmp | uniq -c | sort -n
|
| 30 | }
|
| 31 |
|
| 32 | "$@"
|