#!/bin/sh -e

root="$(dirname "$(realpath -- "$0")")"
tmp=$(mktemp -d)
trap "rm -fr $tmp" HUP PIPE INT QUIT TERM EXIT
cd $tmp
PATH="$root/../tcl:$PATH"
mk-fuzz-inputs
cd "$root"
dst=testdata/fuzz/FuzzDecode
mkdir -p $dst
# go install golang.org/x/tools/cmd/file2fuzz@latest
file2fuzz -o $dst $tmp/*
