From: Ruediger Meier <sweet_f_a@gmx.de>
To: kerolasa@gmail.com
Cc: Karel Zak <kzak@redhat.com>,
Benno Schulenberg <bensberg@justemail.net>,
"Util-Linux" <util-linux@vger.kernel.org>
Subject: Re: [PATCH 4/4] docs: setterm.1 clean up manual page groff style
Date: Thu, 29 May 2014 12:23:40 +0200 [thread overview]
Message-ID: <201405291223.40734.sweet_f_a@gmx.de> (raw)
In-Reply-To: <CAG27Bk2FVPQgR8Qd-y3KfN9X9zs7w_jr1GiRqFGtdMjdZNk1Bw@mail.gmail.com>
On Thursday 29 May 2014, Sami Kerola wrote:
> On 27 May 2014 15:46, Karel Zak <kzak@redhat.com> wrote:
> > On Mon, May 26, 2014 at 04:46:12PM +0100, Sami Kerola wrote:
> >> git://github.com/kerolasa/lelux-utiliteetit.git rename
> >
> > Not merged, it seems that the tests still uses the current directory
> > rather than $TS_OUTDIR, right?
>
> Oh, that's a beginner mistake. Fix is available in same git remote
> location. All I did was a cd before file operations in each script,
> something like this:
>
> +++ b/tests/ts/rename/basic
> @@ -22,6 +22,7 @@ TS_DESC="basic check"
> ts_init "$*"
>
> ts_check_test_command "$TS_CMD_RENAME"
> +cd $TS_OUTDIR
>
I know we are doing similar already in other tests too. IMO cd in scripts can be very dangerous, specially if there is no error handling.
For example if ts_init is broken (while you are working on it) and TS_OUTDIR would be unset then "cd $TS_OUTDIR" would jump into your $HOME ... which could be really bad.
At least I would quote it
cd "$TS_OUTDIR"
or even better
cd "$TS_OUTDIR" || exit 1
cu,
Rudi
next prev parent reply other threads:[~2014-05-29 10:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-24 11:08 [PATCH 0/4] setterm: documentation updates Sami Kerola
2014-05-24 11:08 ` [PATCH 1/4] setterm: add usage() descriptions Sami Kerola
2014-05-24 12:30 ` Benno Schulenberg
2014-05-25 10:57 ` Sami Kerola
2014-05-25 20:51 ` Benno Schulenberg
2014-05-24 11:08 ` [PATCH 2/4] docs: setterm.1 add missing options to manual page and remove duplicate Sami Kerola
2014-05-24 12:33 ` Benno Schulenberg
2014-05-25 10:57 ` Sami Kerola
2014-05-24 11:08 ` [PATCH 3/4] docs: setterm.1 add options compatibility note Sami Kerola
2014-05-24 12:38 ` Benno Schulenberg
2014-05-25 10:58 ` Sami Kerola
2014-05-24 11:08 ` [PATCH 4/4] docs: setterm.1 clean up manual page groff style Sami Kerola
2014-05-24 12:44 ` Benno Schulenberg
2014-05-25 10:58 ` Sami Kerola
2014-05-25 21:10 ` Benno Schulenberg
2014-05-26 8:42 ` Sami Kerola
2014-05-26 10:11 ` Karel Zak
2014-05-26 15:46 ` Sami Kerola
2014-05-27 14:46 ` Karel Zak
2014-05-29 9:48 ` Sami Kerola
2014-05-29 10:23 ` Ruediger Meier [this message]
2014-05-30 7:44 ` Sami Kerola
2014-06-01 22:35 ` Ruediger Meier
2014-06-02 16:42 ` Sami Kerola
2014-06-02 21:23 ` Bernhard Voelker
2014-06-02 21:35 ` Ruediger Meier
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=201405291223.40734.sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=bensberg@justemail.net \
--cc=kerolasa@gmail.com \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox