From: "Slava Semushin" <slava.semushin@gmail.com> To: "ALT Devel discussion list" <devel@lists.altlinux.org> Subject: Re: [devel] [git update] packages/prometeus: heads/master Date: Thu, 20 Sep 2007 16:05:10 +0700 Message-ID: <75e139a00709200205u4a012460s6a0ad59596ecb2ad@mail.gmail.com> (raw) In-Reply-To: <20070920042934.5F69A1CB441C@ssh.git.local.altlinux.org> 2007/9/20, Avramenko Andrew <liks / altlinux.org>: > Update of /people/liks/packages/prometeus.git [...] > --- a/prometeus/scripts/gitrepos2mysql > +++ b/prometeus/scripts/gitrepos2mysql [...] > +system("cd /tmp; wget http://git.altlinux.org/people-packages-list"); Поискал в мане и нашел, что у wget есть опция -P, которая позволяет указать каталог для сохранения файла. Думаю, что лучше будет использовать её: - system("cd /tmp; wget http://git.altlinux.org/people-packages-list"); +system("wget -P /tmp http://git.altlinux.org/people-packages-list"); Плюсы вижу следующие: - меньше команд, меньше процессов создаётся и быстрее работает - избавляет от возможной проблемы, когда cd /tmp не удаётся выполнить, тогда текущий каталог не изменится, файл сохранится не в /tmp и все последующие команды не смогут отработать, а временный файл останется где попало Также, возможно, стОит использовать опцию -q. > > +open(FILE,"/tmp/people-packages-list"); > +@list = <FILE>; > +close(FILE); > +unlink("/tmp/people-packages-list"); [...] -- + Slava Semushin | slava.semushin @ gmail.com + ALT Linux Team | php-coder @ altlinux.ru
next parent reply other threads:[~2007-09-20 9:05 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-09-20 9:05 ` Slava Semushin [this message] 2007-09-20 9:28 ` Avramenko Andrew 2007-09-20 12:15 ` Anton Farygin 2007-09-20 13:48 ` Alexey I. Froloff 2007-09-21 9:57 ` Avramenko Andrew 2007-09-20 18:40 ` Alexey Tourbin
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=75e139a00709200205u4a012460s6a0ad59596ecb2ad@mail.gmail.com \ --to=slava.semushin@gmail.com \ --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