about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/build-hook.hook.sh28
1 files changed, 15 insertions, 13 deletions
diff --git a/tests/build-hook.hook.sh b/tests/build-hook.hook.sh
index 83fa3bf78757..ff709985d3af 100755
--- a/tests/build-hook.hook.sh
+++ b/tests/build-hook.hook.sh
@@ -2,20 +2,22 @@
 
 #set -x
 
-drv=$4
+while read x y drv rest; do
 
-echo "HOOK for $drv" >&2
+    echo "HOOK for $drv" >&2
 
-outPath=`sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv`
+    outPath=`sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv`
 
-echo "output path is $outPath" >&2
+    echo "output path is $outPath" >&2
 
-if `echo $outPath | grep -q input-1`; then
-    echo "# accept" >&2
-    read x
-    echo "got $x"
-    mkdir $outPath
-    echo "BAR" > $outPath/foo
-else
-    echo "# decline" >&2
-fi
+    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
\ No newline at end of file