make-dbus-glib-error-enum.sh use sh but with syntax of bash
Olivier Andrieu
oliv__a at users.sourceforge.net
Fri Dec 17 06:14:41 PST 2004
> Marcin Krzyzanowski [Tue, 14 Dec 2004]:
> Użytkownik Olivier Andrieu napisał:
> > > Marcin Krzyzanowski [Mon, 13 Dec 2004]:
> > >
> > > Hi,
> > >
> > > in file dbus/make-dbus-glib-error-enum.sh
> > >
> > > there is
> > > #!/bin/sh
> > >
> > > SRC=$1
> > > DEST=$2
> > >
> > > function die()
> > > {
> > > echo $1 1>&2
> > > /bin/rm $DEST.tmp
> > > exit 1
> > > }
> > >
> > >
> > > but this is a bash syntax AFAIK.
> > >
> > > In my system sh -> ksh, so maybe there should be
> > >
> > > #! /bin/bash
> > >
> > > ?
> >
> > Or, just use a strictly POSIX-compliant syntax, i.e. get rid of the
> > `function' keyword. Does your ksh accept it ?
> >
>
> yes. right.
Bah, who needs sh anyway ?
:)
--
Olivier
-------------- next part --------------
#!/bin/sed -f
# ./make-dbus-glib-error-enum.sed dbus-protocol.h > dbus-glib-error-enum.h
/^#define DBUS_ERROR/ {
s/#define DBUS_ERROR/DBUS_GERROR/
s/ \+".*$/,/
p
}
$ a\
#ifndef DBUS_INSIDE_DBUS_GLIB_H\
#error "this file may only be included by dbus-glib.h"\
#endif
d
More information about the dbus
mailing list