From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 24 Mar 2008 22:18:27 +0300 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20080324191827.GZ31135@solemn.turbinal> Mail-Followup-To: devel@lists.altlinux.org References: <20080324190536.GA19045@dad.imath.kiev.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dZHW955j1vPFHE0Q" Content-Disposition: inline In-Reply-To: <20080324190536.GA19045@dad.imath.kiev.ua> Subject: Re: [devel] repocop 0.07 changes X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.10b3 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2008 19:18:45 -0000 Archived-At: List-Archive: List-Post: --dZHW955j1vPFHE0Q Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 24, 2008 at 09:05:36PM +0200, Igor Vlasenko wrote: > =E2=CF=CC=D8=DB=C5 =D7=D3=C5=C7=CF =D7 repocop 0.06 =CD=C5=CE=D1 =CE=C1= =D0=D2=D1=C7=C1=CC=C1 =CE=C5=CF=C2=C8=CF=C4=C9=CD=CF=D3=D4=D8 2 =DE=C1=D3= =C1 =D0=D2=CF=C7=CF=CE=D1=D4=D8 > =DE=C5=D2=C5=DA =D4=C5=D3=D4 =D7=C5=D3=D8 =D2=C5=D0=CF=DA=C9=D4=CF=D2=C9= =CA, =C5=D3=CC=C9 =D7 =D4=C5=D3=D4=C5 =C8=CF=D4=D8 =DE=D4=CF-=D4=CF =CD=C5= =CE=D1=C5=D4=D3=D1. =F1 =C4=CC=D1 =DC=D4=CF=C7=CF =D7 =D3=D7=CF=C5 =D7=D2=C5=CD=D1 =D7 =D0=C1= =CB=C5=D4=C5 qa-robot =D3=C4=C5=CC=C1=CC cmdcache(1). =EE=CF =CE=C9=CB=C1=CB=CF=CA =C9=CE=D7=C1=CC=C9=C4=C1=C3=C9=C9 =CB=C5=DB=C1= =D4=C1=CD =CE=C5=D4, =D4=C1=CB =DE=D4=CF =DC=D4=CF =CD=CF=D6=CE=CF =C9=D3= =D0=CF=CC=D8=DA=CF=D7=C1=D4=D8 =D4=CF=CC=D8=CB=CF =C4=CC=D1 =CF=DE=C5=CE=D8 =D3=D4=C1=C2=C9=CC=D8=CE=CF = =D2=C1=C2=CF=D4=C1=C0=DD=C9=C8 =CB=CF=CD=C1=CE=C4 -- =CE=C1=D0=D2=C9=CD=C5= =D2, =C4=CC=D1 file(1) =D7 =D3=CF=DE=C5=D4=C1=CE=C9=C9 c nm(1). $ man cmdcache |cat -s CMDCACHE(1) User Contributed Perl Documentation CMDCACHE= (1) NAME cmdcache - simple cache for command output SYNOPSIS cmdcache [-h] command FILE DESCRIPTION cmdcache wraps command and caches its output. command must take exactly one argument, an existent FILE (or possibly a directory). P= re- vious command output is reused when "st_ino", "st_size", and "st_mti= me" of the FILE match. cmdcache can be sourced by specifying null argument for the command. Shell function with the same name is provided, and command can be a shell function, too. Suggested usage is as follows: # implement custom command with a shell function my_command() { local f=3D"$1"; study "$f"; } # grab cmdcache shell function . cmdcache "" # process arguments and cache the results for f; do cmdcache my_command "$f"; done Upon successful command completion, cache file is stored under "$HOME/.cmdcache/command" directory. The directory has up to 97 sub= di- rectories, due to "mod 97" hash function. That is, the designed cac= he cacpacity is about 10k (100 files * 100 subdirs), and the capacity d= oes not impose any performance hit. When command return code is non-zero, cache file is not created, and the return code of cmdcache is that of the command. The return code= is 2 if an error occurred (e.g. if FILE does not exist). If FILE has changed upon command completion, the return code is 2. This means that FILE must not be modified by the command. AUTHOR Written by Alexey Tourbin . COPYING Copyright (c) 2005 Alexey Tourbin, ALT Linux Team. This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. SEE ALSO stat(2), ccache(1) perl v5.8.8 2007-11-27 CMDCACHE= (1) --dZHW955j1vPFHE0Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iEYEARECAAYFAkfn/oMACgkQfBKgtDjnu0atFgCgiIb6CBuo8k3BgeM0yTLYU2W7 /eYAnA3AKVpqxEzWaole/QAOP6nupJlr =XW/y -----END PGP SIGNATURE----- --dZHW955j1vPFHE0Q--