From: Joerg Jaspert Date: Sun, 1 Nov 2009 21:06:24 +0000 (+0100) Subject: copyoverrides X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=629c016d5b4acb451555548c3c00175b4dd9cd55;p=dak copyoverrides and in dinstall Signed-off-by: Joerg Jaspert --- diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 0fe0b1cf..28693bcf 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -329,11 +329,39 @@ function mkmaintainers() { fi } +function copyoverrides() { + log 'Copying override files into public view ...' + + for f in $copyoverrides ; do + cd $overridedir + chmod g+w override.$f + + cd $indices + rm -f .newover-$f.gz + pc="`gzip 2>&1 -9nv <$overridedir/override.$f >.newover-$f.gz`" + set +e + nf=override.$f.gz + cmp -s .newover-$f.gz $nf + rc=$? + set -e + if [ $rc = 0 ]; then + rm -f .newover-$f.gz + elif [ $rc = 1 -o ! -f $nf ]; then + echo " installing new $nf $pc" + mv -f .newover-$f.gz $nf + chmod g+w $nf + else + echo $? $pc + exit 1 + fi + done +} + function scripts() { log "Running various scripts from $scriptsdir" cd $scriptsdir mkmaintainers - ./copyoverrides + copyoverrides mklslar ./mkfilesindices ./mkchecksums diff --git a/scripts/debian/copyoverrides b/scripts/debian/copyoverrides deleted file mode 100755 index a90db62d..00000000 --- a/scripts/debian/copyoverrides +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh - -set -e -. $SCRIPTVARS -echo 'Copying override files into public view ...' - -for f in $copyoverrides ; do - cd $overridedir - chmod g+w override.$f - - cd $indices - rm -f .newover-$f.gz - pc="`gzip 2>&1 -9nv <$overridedir/override.$f >.newover-$f.gz`" - set +e - nf=override.$f.gz - cmp -s .newover-$f.gz $nf - rc=$? - set -e - if [ $rc = 0 ]; then - rm -f .newover-$f.gz - elif [ $rc = 1 -o ! -f $nf ]; then - echo " installing new $nf $pc" - mv -f .newover-$f.gz $nf - chmod g+w $nf - else - echo $? $pc - exit 1 - fi -done