about summary refs log tree commit diff
path: root/tests/substituter.builder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/substituter.builder.sh')
-rw-r--r--tests/substituter.builder.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/substituter.builder.sh b/tests/substituter.builder.sh
new file mode 100644
index 000000000000..c9ce0a08c6a8
--- /dev/null
+++ b/tests/substituter.builder.sh
@@ -0,0 +1,22 @@
+# Set a PATH (!!! impure).
+export PATH=/bin:/usr/bin:$PATH
+
+mkdir $out
+
+cat > $out/substituter <<EOF
+#! /bin/sh -ex
+echo \$*
+
+case \$* in
+    *aaaa*)
+        echo "Closure([\"\$2\"],[(\"\$2\",[])])" > \$1
+        ;;
+    *)
+        mkdir \$1
+        echo \$3 \$4 > \$1/hello
+        ;;
+esac        
+EOF
+
+chmod +x $out/substituter
+