2004-05-13 22:14:49 +03:00
|
|
|
#! /bin/sh
|
|
|
|
|
2005-01-25 13:55:43 +02:00
|
|
|
#set -x
|
2004-05-12 12:35:51 +03:00
|
|
|
|
2004-05-13 22:14:49 +03:00
|
|
|
drv=$4
|
2004-05-12 12:35:51 +03:00
|
|
|
|
2004-05-13 22:14:49 +03:00
|
|
|
echo "HOOK for $drv" >&2
|
2004-05-12 12:35:51 +03:00
|
|
|
|
2005-01-25 13:55:43 +02:00
|
|
|
outPath=$(sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv)
|
2004-05-12 12:35:51 +03:00
|
|
|
|
2004-05-13 22:14:49 +03:00
|
|
|
echo "output path is $outPath" >&2
|
2004-05-12 12:35:51 +03:00
|
|
|
|
|
|
|
if $(echo $outPath | grep -q input-1); then
|
2009-03-28 21:29:55 +02:00
|
|
|
echo "# accept" >&2
|
|
|
|
read x
|
2004-05-13 22:14:49 +03:00
|
|
|
echo "got $x"
|
2004-05-12 12:35:51 +03:00
|
|
|
mkdir $outPath
|
|
|
|
echo "BAR" > $outPath/foo
|
2004-05-13 22:14:49 +03:00
|
|
|
else
|
2009-03-28 21:29:55 +02:00
|
|
|
echo "# decline" >&2
|
2004-05-12 12:35:51 +03:00
|
|
|
fi
|