#!/bin/sh

# Outputs the Go files a reference doc may depend on.
#
# Must be run from the website directory.

cat ${1%.html}.md |
  awk '/^@module/{ if (NF == 3) { print $3 } else { print "pkg/mods/" $2 } }' |
  sed 's/-//g' |
  while read dir; do
    echo ../$dir ../$dir/*
  done
