ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Addenda to /etc/profile.d
@ 2001-06-01  0:19 Alexander Bokovoy
  2001-06-01  6:42 ` Mikhail Zabaluev
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alexander Bokovoy @ 2001-06-01  0:19 UTC (permalink / raw)
  To: devel

Подумалось тут, а не добавить ли следующие 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 $@
}

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

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

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
}

В дальнейшем в этот файл можно добавлять и другие функции.
-- 
Sincerely yours, Alexander Bokovoy 
  The Midgard Project    | ALT  Linux  Team | Minsk Linux Users Group
 www.midgard-project.org | www.altlinux.ru  |    www.minsk-lug.net 
-- You won't skid if you stay in a rut.
		-- Frank Hubbard
_______________________________________________
Devel mailing list
Devel@linux.iplabs.ru
http://www.logic.ru/mailman/listinfo/devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-06-02  7:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-01  0:19 [devel] Addenda to /etc/profile.d 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
2001-06-01 19:03   ` Alexander Bokovoy
2001-06-01 19:18     ` Sergey Vlasov
2001-06-02  7:26       ` Alexander Bokovoy

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