de91c762cab432555890bbbb78da7385c457acb3
[darcs-mirror-ipatch.git] / tests / split2 / run.sh
1 #!/bin/bash
2
3 set -e
4
5 cd $(dirname $0)
6
7 if test -x ../../dist/build/ipatch/ipatch
8 then IPATCH=$PWD/../../dist/build/ipatch/ipatch
9 else IPATCH=ipatch
10 fi
11
12 rm -rf tmp
13
14 cp -r before/ tmp
15 cd tmp
16 export PATH="..:$PATH"
17 ( echo yynnpatches/featureA.patch
18   echo yynpatches/addfile.patch
19   echo yypatches/removefile.patch
20 )| $IPATCH split patches/testpatch
21
22 perl -p -i -e 's/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d.\d+ .\d\d\d\d/ignored date/' patches/featureA.patch patches/addfile.patch patches/removefile.patch
23 cd ..
24 diff -r tmp after
25 rm -rf tmp
26 echo "Test done"
27