shell script equivalent to cflow ?
Tim Freeman
tim@fungible.com
Sun, 1 Feb 2004 11:52:38 -0700
>I believe that I have once seen some piece of software that
>did for shell scripts pretty much the same what cflow does for C
>code. Unfortunately I can't remember any details about it anymore
>and thus can't find it.
ocamldot does what you want for objective caml.
The hard part is drawing the pretty diagram after you've figured out
the dependencies. Fortunately, this is already implemented. I think
it's called dotty or some such. It's one of the suggested packages
for ocamldot.
So all you need is a perl script that searches all of your shell
scripts for mentions of the names of other shell scripts, print a file
in the same format as the output from ocamldot, and you're all set.
If the scripts have names like "the" and "a" then you'll get lots of
false positive dependencies. If the scripts aren't confined to a
known set of directories, then you'll get a bunch of false negative
dependencies. If these problems are ignorable in practice, then it
seems like short work.
--
Tim Freeman tim@fungible.com
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78