From: "Alexey I. Froloff" <raorn@altlinux.org>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: [devel] I: gear-massupdate subdir file... [-- gear-update options]
Date: Sun, 28 Jun 2009 12:00:52 +0400
Message-ID: <20090628080052.GA27278@altlinux.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 505 bytes --]
В аттаче моя наколенная поделка, которая обновляет тарболы и
ставит теги. В отличие от gear-update, первым аргументом идёт
каталог, который обновляется, потом перечисляются тарболы. Всё
что идёт после -- отдаётся gear-update. Умеет выцеплять версию
из имени файла (довольно ограниченное количество вариантов, но
это чуть менее чем 92.7%) и ставить тег. А то руками это делать
как-то утомительно.
Поюзайте, покритикуйте, я это причешу и буду пропихивать в gear.
--
Regards,
Sir Raorn.
[-- Attachment #1.2: gear-massupdate --]
[-- Type: text/plain, Size: 665 bytes --]
#!/bin/sh -efu
subdir="$1" && shift
files=
while [ $# -gt 0 ]; do
case "$1" in
--) shift; break;;
*) files="$files
$1" ;;
esac
shift
done
for f in $files; do
case "$f" in
*.tar) ext="tar";;
*.tar.gz) ext="tar.gz";;
*.tar.bz2) ext="tar.bz2";;
*.cpio) ext="cpio";;
*.cpio.gz) ext="cpio.gz";;
*.cpio.bz2) ext="cpio.bz2";;
*.zip) ext="zip";;
*) echo "fatal!"; exit 1;;
esac
nv="${f%.$ext}"
[ -z "${nv##*-src}" ] && nv="${nv%-src}"
n="${nv%-*}"
v="${nv##*-}"
git clean -f -d "$subdir"
gear-update "$@" -- "$f" "$subdir"
faketime -r "$f" -- git commit -m "Imported $f"
faketime -r "$f" -- git tag -f -m "$n $v" "$n-$v"
done
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2009-06-28 8:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-28 8:00 Alexey I. Froloff [this message]
2009-06-28 11:14 ` Dmitry V. Levin
2009-06-28 11:51 ` Alexey Gladkov
2009-06-28 13:50 ` Alexey I. Froloff
2009-06-28 11:57 ` Alexey Gladkov
2009-06-28 11:59 ` Alexey Gladkov
2009-06-28 17:17 ` Alexey I. Froloff
2009-06-28 17:32 ` Alexey I. Froloff
2009-06-28 18:12 ` Dmitry V. Levin
2009-06-28 17:18 ` Alexey I. Froloff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090628080052.GA27278@altlinux.org \
--to=raorn@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git