[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master 2/7] copyoverrides



and in dinstall

Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 config/debian/cron.dinstall  |   30 +++++++++++++++++++++++++++++-
 scripts/debian/copyoverrides |   29 -----------------------------
 2 files changed, 29 insertions(+), 30 deletions(-)
 delete mode 100755 scripts/debian/copyoverrides

diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall
index 0fe0b1c..28693bc 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 a90db62..0000000
--- 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
-- 
1.6.3.3



Reply to: