Changed the default behavior to exclude dotfiles (files/dirs starting with .) which is the more common use case. Added --include-dotfiles flag for when hidden files need to be included in the manifest.
20 lines
379 B
Bash
Executable File
20 lines
379 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# usage.sh - Generate and check a manifest from the repo
|
|
# Run from repo root: ./contrib/usage.sh
|
|
|
|
TMPDIR=$(mktemp -d)
|
|
MANIFEST="$TMPDIR/index.mf"
|
|
|
|
cleanup() {
|
|
rm -rf "$TMPDIR"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
echo "Building mfer..."
|
|
go build -o "$TMPDIR/mfer" ./cmd/mfer
|
|
|
|
"$TMPDIR/mfer" generate -o "$MANIFEST" .
|
|
"$TMPDIR/mfer" check --base . "$MANIFEST"
|