about summary refs log blame commit diff
path: root/tests/build-hook.hook.sh
blob: 83fa3bf78757dd4fe995aa4f4c6d8aa8d2b113cc (plain) (tree)
1
2
3
4
5
6
7
8
9

          
       
 
      
 
                        
 
                                                           
 
                                  
 
                                          

                       
                 

                             
    
                        
  
#! /bin/sh

#set -x

drv=$4

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 x
    echo "got $x"
    mkdir $outPath
    echo "BAR" > $outPath/foo
else
    echo "# decline" >&2
fi