2004-05-13 21:14:49 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
2005-01-25 12:55:43 +01:00
|
|
|
#set -x
|
2004-05-12 11:35:51 +02:00
|
|
|
|
2010-08-25 22:44:28 +02:00
|
|
|
while read x y drv rest; do
|
2004-05-12 11:35:51 +02:00
|
|
|
|
2010-08-25 22:44:28 +02:00
|
|
|
echo "HOOK for $drv" >&2
|
2004-05-12 11:35:51 +02:00
|
|
|
|
2010-08-25 22:44:28 +02:00
|
|
|
outPath=`sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv`
|
2004-05-12 11:35:51 +02:00
|
|
|
|
2010-08-25 22:44:28 +02:00
|
|
|
echo "output path is $outPath" >&2
|
2004-05-12 11:35:51 +02:00
|
|
|
|
2010-08-25 22:44:28 +02:00
|
|
|
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
|