delorie.com/archives/browse.cgi | search |
Message-Id: | <200409030708.i8378UnG005280@delorie.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Reply-To: | <fergus AT bonhard DOT uklinux DOT net> |
From: | <fergus AT bonhard DOT uklinux DOT net> |
To: | <cygwin AT cygwin DOT com> |
Cc: | <fergus AT bonhard DOT uklinux DOT net> |
Subject: | How to check your local mirror |
Date: | Fri, 3 Sep 2004 08:05:56 +0100 |
MIME-Version: | 1.0 |
X-UoD-Spam-Score: | -4.7 (----) |
X-UoD-Spam-Report: | -------------------------------------------------- This message has been scanned by a SpamAssassin installation on the spam checking server hughnew at the University of Dundee. Content analysis details: (-4.7 hits, 5.0 required) 0.2 NO_REAL_NAME From: does not include a real name -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0001] |
X-UoD-Scan-Signature: | 6ae28009951c15003d1de70b57ffb362 |
Note-from-DJ: | This may be spam |
------=_NextPart_000_0000_01C4918C.EA3690B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit If you want to check the integrity of your local mirror you might find the attached script useful (as it stands, or as the basis for something you write yourself). The syntax is chk.us mydir where mydir might be /f/Cyg0 or /cygdrive/c/cygmirror or wherever it is you keep the file setup.ini and the directory release/. Note that mydir does not need a closing slash mydir/ but the script will still work if you include it. The mirror that is used for the comparison is ftp://mirrors.rcn.net but you can alter this if you want to. There are 3 parts to what the script does: 1. checks the timestamp on your local setup.ini with the one currently on the mirror; 2. checks that the files you've got match the ones you should have (this just checks the names); 3. checks the md5sum's. The script ends by deleting the temporary listings created in order to make the comparisons. If you keep them instead, and compare tmpf.setup.chk.us.1 with ..3, you'll see a list of the redundant files on your local mirror: you could delete these. Or even pipe the list for automatic deletion, I guess. Fergus ------=_NextPart_000_0000_01C4918C.EA3690B0 Content-Type: application/octet-stream; name="chk.us" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="chk.us" #! /bin/sh echo Saved setup.ini is dated ... grep "setup-timestamp" $1/setup.ini wget -q ftp://mirrors.rcn.net/pub/sourceware/cygwin/setup.ini echo Downloaded setup.ini is dated ... mv setup.ini setup.chk.us.ini grep "setup-timestamp" setup.chk.us.ini cat setup.chk.us.ini | sed -n '/release\//p' | sed 's/^.*release\///g' > tm= pf.setup.chk.us.0 cat tmpf.setup.chk.us.0 | sed 's/\( [a-f0-9]*\)*$//g' | sort | uniq > tmpf.= setup.chk.us.1 cat tmpf.setup.chk.us.0 | sed 's/^\(.*\) \([a-f0-9]*\) \([a-f0-9]*\)$/\1 \3= /g' | sort | uniq > tmpf.setup.chk.us.2 echo Check resource ... find $1/release/ -type f | sed -e 's/^.*release\///g' | sort > tmpf.setup.c= hk.us.3 diff tmpf.setup.chk.us.1 tmpf.setup.chk.us.3 | grep "<" echo Check md5sum-s ... sed -e 's/^/\/f\/Cyg0\/release\//g' tmpf.setup.chk.us.1 | xargs md5sum | se= d -e 's/\*\/f\/Cyg0\/release\///g' -e 's/^\(.*\) \(.*\)$/\2 \1/g' | sort > = tmpf.setup.chk.us.4 diff tmpf.setup.chk.us.2 tmpf.setup.chk.us.4 | grep "<" rm setup.chk.us.ini rm tmpf.setup.chk.us.* ------=_NextPart_000_0000_01C4918C.EA3690B0 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------=_NextPart_000_0000_01C4918C.EA3690B0--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |