From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 28 Jun 2009 21:17:31 +0400 From: "Alexey I. Froloff" To: ALT Devel discussion list Message-ID: <20090628171731.GD27278@altlinux.org> References: <20090628080052.GA27278@altlinux.org> <4A475A8E.6050808@altlinux.ru> <4A475B1C.8090707@altlinux.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fwqqG+mf3f7vyBCB" Content-Disposition: inline In-Reply-To: <4A475B1C.8090707@altlinux.ru> User-Agent: Mutt/1.5.20 (2009-06-23) Subject: Re: [devel] I: gear-massupdate subdir file... [-- gear-update options] 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: Sun, 28 Jun 2009 17:17:33 -0000 Archived-At: List-Archive: List-Post: --fwqqG+mf3f7vyBCB Content-Type: multipart/mixed; boundary="cYtjc4pxslFTELvY" Content-Disposition: inline --cYtjc4pxslFTELvY Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 28, 2009 at 03:59:24PM +0400, Alexey Gladkov wrote: > > =F0=D2=C1=D7=C9=CC=D8=CE=CF =CC=C9 =D1 =D0=CF=CE=D1=CC, =DE=D4=CF =DC= =D4=C1 =D5=D4=C9=CC=C9=D4=C1 =D0=CF=CC=C5=DA=CE=C1 =CC=C9=DB=D8 =D4=CF=C7= =C4=C1, =CB=CF=C7=C4=C1 > > =CB=C1=CB=CF=CA-=D4=CF =D0=D2=CF=C5=CB=D4 =C4=CF=C2=C1=D7=CC=D1=C5=D4= =D3=D1 =D7 gear =C9=DA =C9=D3=C8=CF=C4=CE=C9=CB=CF=D7 ? > =E5=D3=CC=C9 =C4=C1, =D4=CF =D4=CF=C7=C4=C1 =C5=A3 =D3=D4=CF=C9=D4 =CE=C1= =DA=D7=C1=D4=D8 gear-import =C9 =C4=CF=C2=C1=D7=C9=D4=D8 =C6=D5=CE=CB=C3=C9= =CF=CE=C1=CC ldv. =FA=C1=C4=C1=DE=C1 =D3=D7=CF=C4=C9=D4=D3=D1 =CB: 1. =F2=C1=D3=D0=C1=D2=D3=C9=D4=D8 =C9=CD=D1 =C6=C1=CA=CC=C1 =CE=C1 =CE=C1= =DA=D7=C1=CE=C9=C5 =D0=D2=CF=C5=CB=D4=C1 =C9 =D7=C5=D2=D3=C9=C0. 2. =FA=C1=D0=CF=CC=CE=C9=D4=D8 =DB=C1=C2=CC=CF=CE. =2Egear/rules =C9 =D3=D0=C5=CB =CE=C5=C4=CF=D3=D4=D5=D0=CE=D9. Proof of concept =D7 =C1=D4=D4=C1=DE=C5. =EE=C5 =D0=CF=C4=C4=C5=D2=D6=C9= =D7=C1=C5=D4 =D4=C1=D2=C2=CF=CC=D9 =D7=C9=C4=C1 http://ftp.debian.org/debian/pool/main/a/adduser-ng/adduser-ng_0.1.2-1.3.ta= r.gz --=20 Regards, Sir Raorn. --cYtjc4pxslFTELvY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=gear-massupdate Content-Transfer-Encoding: quoted-printable #!/bin/sh -efu =2E gear-sh-functions name=3D version=3D file=3D parse_filename() { local sep tmp name=3D version=3D file=3D"${1##*/}" # .(tar(.gz|.bz2.wtf)?|t(gz|bz?2|wtf)) tmp=3D"${file%.*}" tmp=3D"${tmp%.tar}" # .orig.tar.gz tmp=3D"${tmp%.orig}" # name-version-(src|sources|whatever) if printf %s "$tmp" | egrep -qse '-[a-z]+$' >/dev/null 2>&1; then tmp=3D"${tmp%-*}" fi # name-version and name_version sep=3D_ [ -z "${tmp##*_*}" -a -n "${tmp##*_*-*}" ] || sep=3D- name=3D"${tmp%$sep*}" version=3D"${tmp#$name$sep}" } commit_msg=3D'Imported @file@' tag_name=3D'@name@-@version@' tag_msg=3D'@name@ @version@' subdir=3D"$1" && shift files=3D while [ $# -gt 0 ]; do case "$1" in --) shift; break;; *) files=3D"$files $1" ;; esac shift done for f in $files; do parse_filename "$f" tmp_ci_msg=3D"$commit_msg" tmp_tag_name=3D"$tag_name" tmp_tag_msg=3D"$tag_msg" =09 subst_key_in_vars '@file@' "$file" tmp_ci_msg tmp_tag_name tmp_tag_msg subst_key_in_vars '@name@' "$name" tmp_ci_msg tmp_tag_name tmp_tag_msg subst_key_in_vars '@version@' "$version" tmp_ci_msg tmp_tag_name tmp_tag_m= sg git clean -f -d "$subdir" gear-update "$@" -- "$f" "$subdir" faketime -r "$f" -- git commit -m "$tmp_ci_msg" faketime -r "$f" -- git tag -f -m "$tmp_tag_msg" "$tmp_tag_name" done --cYtjc4pxslFTELvY-- --fwqqG+mf3f7vyBCB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkpHpaYACgkQVqT7+fkT8wrUTQCgh9uhF4NMIpOV32FtX2BRem/P 5uwAoJ/v8pq4UBPHae8No51Tfg7Lv6TF =67W9 -----END PGP SIGNATURE----- --fwqqG+mf3f7vyBCB--