ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@mivlgu.murom.ru>
To: devel@linux.iplabs.ru
Subject: Re: [devel] Addenda to /etc/profile.d
Date: Fri, 1 Jun 2001 22:53:18 +0400
Message-ID: <20010601225318.6a2c29f3.vsu@mivlgu.murom.ru> (raw)
In-Reply-To: <20010601031906.C4558@boids.avilink.net>

On Fri, 1 Jun 2001 03:19:07 +0300
Alexander Bokovoy <ab@avilink.net> wrote:

> Подумалось тут, а не добавить ли следующие BASH-ориентированные функции
> в
> /etc/profile.d:
> 1. В /etc/profile.d/cvs.sh можно было бы добавить функции для быстрого
> доступа в уже имеющиеся на диске репозитарии:
> 
> # Обновление репозитария
> # Использование: cvsgetx имя_репозитария (в текущем каталоге)
> function cvsgetx {
>     cvs -d `cat $1/CVS/Root ` -z6 get $@
> }
> 
> # Обновление из конкретной ветки репозитария
> # Использование: cvsbranch НАЗВАНИЕ_ВЕТКИ имя_репозитария
> function cvsbranch {
>     cvs -d `cat $2/CVS/Root ` -z6 get -r $@
> }

Т.е. в Вашем варианте я должен написать для обновления "cvsgetx
some_name". Не проще ли зайти в этот каталог и запустить "cvs -z6 update
-d" (вот на это как раз можно поставить алиас)? Во втором случае не
требуется добавлять имя в командную строку.

Хотя могу себе представить один случай, когда это может оказаться полезным
- при удалении рабочего каталога оставить CVS/, чтобы можно было потом при
необходимости снова взять копию из CVS воспользоваться этими функциями.

> # Отправка данных в репозитарий
> # Использование: cvscommit
> function cvscommit {
>     cvs -d `cat ./CVS/Root ` -z6 commit
> }

Зачем такие сложности - cvs commit сам возьмет CVSROOT как раз из
./CVS/Root. Явно указывать CVSROOT нужно только для login и checkout.
Разве что ради -z6 - но это можно просто записать в ~/.cvsrc (или опять же
добавить алиас).

> Удобство этих функций в том, что не надо устанавливать CVSROOT и помнить
> его для разных репозитариев.

CVS это и так умеет.

> 2. Добавить /etc/profile.d/bugreport.sh:
> 
> # Выдать список пакетов, от которых зависит требуемый пакет
> # Использование: pkgdepend имя_пакета
> function pkgdepend() {
>   DATA=
>   for i in `rpm -q --requires $1|cut -d ' ' -f 1` ; do
>     DATA="$DATA `rpm -q --whatprovides $i`"
>   done
>   echo $DATA | tr ' ' '\n' | sort -u | uniq -u
> }

Вот тут согласен.
_______________________________________________
Devel mailing list
Devel@linux.iplabs.ru
http://www.logic.ru/mailman/listinfo/devel


  parent reply	other threads:[~2001-06-01 18:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-01  0:19 Alexander Bokovoy
2001-06-01  6:42 ` Mikhail Zabaluev
2001-06-01  6:45   ` Alexander Bokovoy
2001-06-01  8:10 ` Dmitry V. Levin
2001-06-01 18:53 ` Sergey Vlasov [this message]
2001-06-01 19:03   ` Alexander Bokovoy
2001-06-01 19:18     ` Sergey Vlasov
2001-06-02  7:26       ` Alexander Bokovoy

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=20010601225318.6a2c29f3.vsu@mivlgu.murom.ru \
    --to=vsu@mivlgu.murom.ru \
    --cc=devel@linux.iplabs.ru \
    /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