Files

13 lines
475 B
Bash
Raw Permalink Normal View History

#!/bin/sh
# Refresh the bundled copies of contracts files under assets/contracts/ from a
# contracts checkout (default: ../contracts). The copies must stay byte-identical:
# crosscheck fails the build otherwise. New files are added by copying them in once.
set -eu
here=$(cd "$(dirname "$0")/.." && pwd)
src=$(cd "${1:-$here/../contracts}" && pwd)
cd "$here"
find assets/contracts -type f | while read -r f; do
cp "$src/${f#assets/contracts/}" "$f"
echo "synced $f"
done