From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 31 Jan 2005 13:09:41 +0300 From: "Dmitry V. Levin" To: ALT Linux Sisyphus discussion list Subject: Re: [sisyphus] =?koi8-r?B?4dLIydcgxdbFxM7F?= =?koi8-r?B?187ZyCDT0sXaz9cg88naycbB?= Message-ID: <20050131100941.GD26695@basalt.office.altlinux.org> Mail-Followup-To: ALT Linux Sisyphus discussion list References: <20050129160657.GA12808@mithraen.dimline.ru> <20050129194347.0ea51f03@3s.home> <20050129164737.GG14358@mithraen.dimline.ru> <20050129181049.GC8709@basalt.office.altlinux.org> <20050130145339.GE12311@mithraen.dimline.ru> <41FE00D5.4010103@altlinux.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2hMgfIw2X+zgXrFs" Content-Disposition: inline In-Reply-To: <41FE00D5.4010103@altlinux.ru> X-fingerprint: 9658 398D 181B 1200 8FC5 26B8 F6F8 846B C1E2 3429 X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2005 10:09:42 -0000 Archived-At: List-Archive: --2hMgfIw2X+zgXrFs Content-Type: multipart/mixed; boundary="n2Pv11Ogg/Ox8ay5" Content-Disposition: inline --n2Pv11Ogg/Ox8ay5 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 31, 2005 at 05:56:37PM +0800, Ivan Fedorov wrote: > Denis Smirnov =D0=C9=DB=C5=D4: > > On Sat, Jan 29, 2005 at 09:10:49PM +0300, Dmitry V. Levin wrote: > >=20 > >>>=E7=C8=CD. =F3=CD=CF=D4=D2=C0 =D7=CE=C9=CD=C1=D4=C5=CC=D8=CE=CF =CC=CF= =C7=C9 -- =C4=C5=CA=D3=D4=D7=C9=D4=C5=CC=D8=CE=CF =D0=D2=C9=DB=CC=CF. =EE= =CF altlinux-release > >>>=D0=CF=DE=C5=CD=D5-=D4=CF =CE=C5 =CD=C5=CE=D1=C5=D4=D3=D1. =E8=CD. > >=20 > > DVL> =E1 =DA=C1=DE=C5=CD =C5=C7=CF =CB=C1=D6=C4=D9=CA =D2=C1=DA =CD=C5= =CE=D1=D4=D8? altlinux-release - =DC=D4=CF =D6=C5 =D2=D5=DE=CE=C1=D1 =D2= =C1=C2=CF=D4=C1. > > DVL> =EB=C1=D6=C4=D9=CA =D2=C1=DA =CD=C5=CE=D1=C5=D4=D3=D1, =CE=C1=D0= =D2=C9=CD=C5=D2, Sisyphus/i586/base/release. > >=20 > > =F0=CF=CE=D1=CC. =E2=D5=CD =D0=D2=C1=D7=C9=D4=D8 =D3=CB=D2=C9=D0=D4. > >=20 > =ED=CF=C7=D5 =D7=D9=D3=CC=C1=D4=D8 =D3=D7=CF=CA... =F1 =C9=D3=D0=CF=CC=D8=DA=D5=C0 =D0=D2=C9=CD=C5=D2=CE=CF =D4=C1=CB=CF=CA = =D3=CB=D2=C9=D0=D4. --=20 ldv --n2Pv11Ogg/Ox8ay5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=archive_sisyphus #!/bin/sh -e PROG="${0##*/}" Fatal() { echo "${0##*/}: $*" >&2 exit 1 } export LC_ALL=C sisyphus=/path/to/Sisyphus pattern='^/path/to/archive/Sisyphus/[[:digit:]]{4}/[[:digit:]]{2}/[[:digit:]]{2}$' format='/path/to/archive/Sisyphus/%CY/%Cm/%Cd\n/path/to/archive/Sisyphus/%TY/%Tm/%Td\n' old="$(find /path/to/archive/Sisyphus/ -type d -mindepth 3 -maxdepth 3 |egrep "$pattern" |sort -r |head -1)" || Fatal "old sisyphus lookup failed." [ -n "$old" -a -d "$old" ] || Fatal "old sisyphus lookup failed." new="$(find "$sisyphus"/i?86/base -mindepth 1 -maxdepth 1 -type f -name pkglist.\* -printf "$format")" || Fatal "new sisyphus lookup failed." new="$(echo "$new" |egrep "$pattern" |sort -r |head -1)" [ -n "$new" ] || Fatal "new sisyphus lookup failed." if [ "$old" = "$new" ]; then echo "$old: latest snapshot already exists." exit 0 fi if [ -d "$new" ]; then echo "$old: NON-latest snapshot already exists." exit 0 fi echo "New snapshot to be created: $new" mkdir -pv ${new%/*} cp -al "$old" "$new" rsync -va --delete-after --stats "$sisyphus"/ "$new"/ --n2Pv11Ogg/Ox8ay5-- --2hMgfIw2X+zgXrFs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFB/gPl9viEa8HiNCkRAnCSAJ4160S9IVqks7RJvH9iz710uc8qsgCeJjQs wm5OkL0IQcwYkpfyfj256/g= =xOn+ -----END PGP SIGNATURE----- --2hMgfIw2X+zgXrFs--