From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Wed, 27 May 2009 18:13:47 +0400 From: Afanasov Dmitry To: ALT Linux Team development discussions Message-ID: <20090527141346.GN1955@ender.fondinvestrk.ru> Mail-Followup-To: ALT Linux Team development discussions MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LwbuP8dfxhLLLUfV" Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Subject: [devel] girar-utils X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 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: Wed, 27 May 2009 14:14:13 -0000 Archived-At: List-Archive: List-Post: --LwbuP8dfxhLLLUfV Content-Type: multipart/mixed; boundary="D9sZ58tf58331Q5M" Content-Disposition: inline --D9sZ58tf58331Q5M Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =DA=C1=C2=D9=CC =D4=C5=CD=D5 =D3=CD=C5=CE=C9=D4=D8, =CB=C1=C0=D3=D8. On Wed, May 27, 2009 at 05:54:53PM +0400, Afanasov Dmitry wrote: > On Wed, May 27, 2009 at 05:27:58PM +0400, Alexey I. Froloff wrote: > > =E5=D3=D4=D8 =D0=C1=CB=C5=D4 girar-utils, =D7 =D2=C5=D0=CF=DA=C9=D4=C1= =D2=C9=CA =CB=CF=D4=CF=D2=CF=C7=CF =D1 =D3=CC=C5=C7=CB=C1 =D0=CF=D0=C9=D3= =D9=D7=C1=C0. > > =EB=C1=CB =C4=CF=CC=D6=C5=CE =D7=D9=C7=CC=D1=C4=C5=D4=D8 =DC=D4=CF=D4 g= irar-get, =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=D2=C1=C2=CF=D4=C1=C5=D4 :) =D3=C4=C5=CC=C1=CE=C1 =C4=CC=D1 =D0=CF= =C4=D3=D4=C1=CE=CF=D7=CB=C9 =D7 rules =CE=C5 =D4=CF=CC=D8=CB=CF version, release =C9 name, =CE=CF =C9 =CC=C0=C2= =D9=C8 =C4=D2=D5=C7=C9=DA =CD=C1=CB=D2=CF=D3=CF=D7 rpm --=20 =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD =E1=C6=C1=CE=C1=D3=CF=D7 =E4=CD=C9=D4=D2=C9=CA --D9sZ58tf58331Q5M Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename=gear-update-rules #!/bin/bash fatal() { [ -z "$1" ] && echo "$@" exit 1 } while :; do case $1 in --debug) set -x ;; --spec) shift SPEC=$1 ;; *) [ -z "$1" ] && break ;; esac shift done rules= rules_in= [ -f .gear/rules.in ] && rules_in=".gear/rules.in" [ -f .gear-rules ] && rules_in=".gear-rules.in" [ -f "$rules_in" ] || exit rules="${rules_in%*.in}" [ -z "$SPEC" ] && SPEC=`ls *.spec 2>/dev/null` [ -f "$SPEC" ] || fatal "spec $SPEC not found" vars="$(awk ' { line = $0; while(match(line, /@([a-z]+)@/, f)) { if(!x[f[1]]) { print f[1]; x[f[1]] = 1; } line = substr(line, RSTART + RLENGTH) } }' $rules_in)" tmpspec=`mktemp --tmpdir spec-XXXXX` trap "rm -f $tmpspec" INT TERM install -p -m644 "$rules_in" "$rules" || fatal for var in $vars; do cat $SPEC > $tmpspec echo "%$var" >> $tmpspec val="$(rpm -bE $tmpspec | tail -1)" [ -z "$val" ] && fatal "$var not expanded" echo "substitute $var --> $val" perl -i -npe "s/\@\Q$var\E@/$val/g" $rules done rm -f $tmpspec --D9sZ58tf58331Q5M-- --LwbuP8dfxhLLLUfV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iEYEARECAAYFAkodSpoACgkQ72GKvac0Iyy0qgCfauyUxvAQM9VXbKl0xtjF06mF GxwAni+NjHjaKwms2rmqMVSdXj7Xh4fN =hu5x -----END PGP SIGNATURE----- --LwbuP8dfxhLLLUfV--