All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aron Griffis <aron@hp.com>
To: Christoph Egger <Christoph.Egger@amd.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 2 of 2] Make tools/check scripts cross-friendly
Date: Mon, 21 Jan 2008 09:50:08 -0500	[thread overview]
Message-ID: <20080121145008.GA9541@fc.hp.com> (raw)
In-Reply-To: <200801211205.42249.Christoph.Egger@amd.com>

Christoph Egger wrote:  [Mon Jan 21 2008, 06:05:42AM EST]
> > diff -r 79cf8ffbc667 -r 735710fbd87c tools/check/check_udev
> > --- a/tools/check/check_udev	Fri Jan 18 22:59:53 2008 -0500
> > +++ b/tools/check/check_udev	Fri Jan 18 22:59:53 2008 -0500
> > @@ -1,34 +1,19 @@
> >  #!/bin/sh
> >  # CHECK-INSTALL
> >
> > -RC=0
> > +. funcs.sh
> >
> > -case ${OS} in
> > +case $OS in
> >  OpenBSD|NetBSD|FreeBSD)
> > -	TOOL="vnconfig"
> > -	which ${TOOL} 1>/dev/null 2>&1 || RC=1
> > +	has_or_fail vncconfig
>                             ^^^^^^
> Typo!!

Thanks, will fix and repost.

> > -if test "${OS}" = "SunOS"; then
> > +if [ "$OS" = "SunOS" ]; then
> 
> What does this fix?

I tried to make the scripts more consistently written while working on
them.

> Don't change this if you can't test on Solaris.

*shrug*

This works on every Bourne shell on every Solaris.  I'll change it
back if you want, but it's pointless.

> > +has_lib() {
> > +	check_sys_root || return 1
> > +
> > +	# subshell to prevent pollution of caller's environment
> > +	(
> > +	PATH=/sbin:$PATH        # for ldconfig
> > +
> > +	# This relatively common in a sys-root; libs are installed but
> > +	# ldconfig hasn't run there, so ldconfig -p won't work.  We can
> > +	# only fix it if it's writeable.
> > +	[ "$OS" != Linux ] || \
> > +	[ -f "$CROSS_SYS_ROOT/etc/ld.so.cache" ] || \
> > +	ldconfig -r "$CROSS_SYS_ROOT" && \
> > +	ldconfig -p ${CROSS_SYS_ROOT+-r "$CROSS_SYS_ROOT"} | grep -Fq "$1"
> > +	return $?
> > +	)
> > +}
> 
> This can be more readable with "if test" constructs.

Yeah, I wasn't very happy with that either.  I'll make it better,
thanks.

Aron

  reply	other threads:[~2008-01-21 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19  4:02 [PATCH 0 of 2] Make tools cross-friendly Aron Griffis
2008-01-19  4:02 ` [PATCH 1 of 2] Make tools/Makefile cross-friendly Aron Griffis
2008-01-19  8:26   ` Keir Fraser
2008-01-19 14:48     ` Aron Griffis
2008-01-19 15:33       ` Aron Griffis
2008-01-19  4:02 ` [PATCH 2 of 2] Make tools/check scripts cross-friendly Aron Griffis
2008-01-21 11:05   ` Christoph Egger
2008-01-21 14:50     ` Aron Griffis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-21 15:29 [PATCH 0 of 2] Make tools cross-friendly, try 2 Aron Griffis
2008-01-21 15:29 ` [PATCH 2 of 2] Make tools/check scripts cross-friendly Aron Griffis

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=20080121145008.GA9541@fc.hp.com \
    --to=aron@hp.com \
    --cc=Christoph.Egger@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.