mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
23 lines
330 B
Bash
23 lines
330 B
Bash
|
# 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
|
||
|
|