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