blob: c9ce0a08c6a8c22ce137b438d8286860587c1264 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
|