2023-01-13 09:34:19 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-03-10 12:24:35 -07:00
|
|
|
# This work is marked with CC0 1.0. To view a copy of this license, visit
|
|
|
|
# <http://creativecommons.org/publicdomain/zero/1.0>
|
2023-01-13 09:34:19 -07:00
|
|
|
|
|
|
|
# Hook to compile Rust source files when they have been changed.
|
|
|
|
|
|
|
|
for file in \
|
|
|
|
$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD |\
|
|
|
|
sed -n -e 's/src\///' -e 's/\.rs//p')
|
|
|
|
do
|
|
|
|
cargo build --release --bin "$file"
|
|
|
|
done
|