elvish/website/tools/cmd-deps
Qi Xiao a9b34ecaca website/Makefile: rewrite dependency logic.
Since .d.elv files are now accessed via Go files that embed them, cmd/md2html
needs to be rebuilt whenever one of its dependencies changes.
2023-01-01 18:09:58 +00:00

15 lines
274 B
Bash
Executable File

#!/bin/sh
# Outputs the dependencies of a command.
#
# Must be run from the website directory.
go list -f '{{ join .Deps "\n" }}' $1 |
sed -n '/^src\.elv\.sh/{
s/^src\.elv\.sh/../
p
}' |
while read dir; do
echo $dir $dir/*
done