]> git.decadent.org.uk Git - dak.git/blob - scripts/backports.org/copyoverrides
Merge commit 'lamby/master' into merge
[dak.git] / scripts / backports.org / copyoverrides
1 #! /bin/sh
2
3 set -e
4 . $SCRIPTVARS
5 echo 'Copying override files into public view ...'
6
7 for f in $copyoverrides ; do
8         cd $overridedir
9         chmod g+w override.$f
10
11         cd $indices
12         rm -f .newover-$f.gz
13         pc="`gzip 2>&1 -9nv <$overridedir/override.$f >.newover-$f.gz`"
14         set +e
15         nf=override.$f.gz
16         cmp -s .newover-$f.gz $nf
17         rc=$?
18         set -e
19         if [ $rc = 0 ]; then
20                 rm -f .newover-$f.gz
21         elif [ $rc = 1 -o ! -f $nf ]; then
22                 echo "   installing new $nf $pc"
23                 mv -f .newover-$f.gz $nf
24                 chmod g+w $nf
25         else
26                 echo $? $pc
27                 exit 1
28         fi
29 done