Mailinglist Archive: opensuse-factory (757 mails)

< Previous Next >
Re: [opensuse-factory] tagmedia question
  • From: Pascal Bleser <pascal.bleser@xxxxxxxxx>
  • Date: Fri, 05 May 2006 13:23:33 +0200
  • Message-id: <445B35B5.5020301@xxxxxxxxx>
houghi wrote:
...
> #TAGMEDIA : Add MD5SUM to the iso if tagmedia is available.
> TAGMEDIA ()
> {
> if [ -e `type -p tagmedia` ]
> then

...

Replace
if [ -e `type -p tagmedia` ]
then
by
if type -p tagmedia &>/dev/null; then

Will avoid "type" giving an error message on stderr when tagmedia is
not found in the PATH ;)
(type -p returns 1 (error) when it cannot find and 0 (ok) when it can
find what is specified behind it)

cheers
--
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\ <pascal.bleser@xxxxxxxxx> <guru@xxxxxxxxxxx>
_\_v FOSDEM 2006 -- 25+26 February 2006 in Brussels

< Previous Next >
Follow Ups
References