diff options
Diffstat (limited to 'tests/build-hook.hook.sh')
-rwxr-xr-x | tests/build-hook.hook.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/build-hook.hook.sh b/tests/build-hook.hook.sh new file mode 100755 index 000000000000..c7472eab7600 --- /dev/null +++ b/tests/build-hook.hook.sh @@ -0,0 +1,23 @@ +#! /bin/sh + +#set -x + +while read x y drv rest; do + + echo "HOOK for $drv" >&2 + + outPath=`sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv` + + echo "output path is $outPath" >&2 + + if `echo $outPath | grep -q input-1`; then + echo "# accept" >&2 + read inputs + read outputs + mkdir $outPath + echo "BAR" > $outPath/foo + else + echo "# decline" >&2 + fi + +done |