mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 08:16:14 +02:00
3f80060500
So all these years I was totally deluded about the meaning of "set -e". You might think that it causes statements like "false && true" or "! true" to fail, but it doesn't...
23 lines
409 B
Bash
Executable file
23 lines
409 B
Bash
Executable file
#! /bin/sh
|
|
|
|
#set -x
|
|
|
|
while read x y drv rest; do
|
|
|
|
echo "HOOK for $drv" >&2
|
|
|
|
outPath=`sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv`
|
|
|
|
echo "output path is $outPath" >&2
|
|
|
|
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
|