about summary refs log tree commit diff
path: root/tests/build-hook.hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/build-hook.hook.sh')
-rw-r--r--tests/build-hook.hook.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/build-hook.hook.sh b/tests/build-hook.hook.sh
new file mode 100644
index 000000000000..7176315d9d11
--- /dev/null
+++ b/tests/build-hook.hook.sh
@@ -0,0 +1,17 @@
+set -x
+
+drv=$1
+
+echo "HOOK for $drv"
+
+outPath=$(sed 's/Derive(\[\"\([^\"]*\)\".*/\1/' $drv)
+
+echo "output path is $outPath"
+
+if $(echo $outPath | grep -q input-1); then
+    mkdir $outPath
+    echo "BAR" > $outPath/foo
+    exit 100
+fi
+
+exit 101
\ No newline at end of file