Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

Usa of "source" in startup scripts

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


florian.boor at kernelconcepts

Jun 17, 2005, 11:26 AM

Post #1 of 4 (176 views)
Permalink
Usa of "source" in startup scripts

Hello,

while integrating some maemo software into OpenEmbedded i ran into trouble
because many startup scripts used "source" instead of "." to source external
files. This seems to be a feature of bash and isn't implemented in busybox ash i
use for the OpenEmbedded images.
To make these scripts more portable i suggest to use ".".

I have some patches for various maemo bits attached.

Greetings

Florian

--
The dream of yesterday Florian Boor
is the hope of today Tel: 0271-771091-14
and the reality of tomorrow. Fax: 0271-771091-19
[Robert Hutchings Goddard, 1904] florian.boor [at] kernelconcepts

6C 44 30 4C 43 20 6B 61 16 07 0F AA E6 97 70 A8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hildon-home-source.patch
Type: text/x-patch
Size: 290 bytes
Desc: not available
Url : http://maemo.org/pipermail/maemo-developers/attachments/20050617/ec927f3e/hildon-home-source.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hildon-initscripts-source.patch
Type: text/x-patch
Size: 3057 bytes
Desc: not available
Url : http://maemo.org/pipermail/maemo-developers/attachments/20050617/ec927f3e/hildon-initscripts-source.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hildon-navigator-source.patch
Type: text/x-patch
Size: 371 bytes
Desc: not available
Url : http://maemo.org/pipermail/maemo-developers/attachments/20050617/ec927f3e/hildon-navigator-source.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hildon-statusbar-source.patch
Type: text/x-patch
Size: 314 bytes
Desc: not available
Url : http://maemo.org/pipermail/maemo-developers/attachments/20050617/ec927f3e/hildon-statusbar-source.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osso-af-startup-source.patch
Type: text/x-patch
Size: 6584 bytes
Desc: not available
Url : http://maemo.org/pipermail/maemo-developers/attachments/20050617/ec927f3e/osso-af-startup-source.bin


riku.voipio at movial

Jun 17, 2005, 1:15 PM

Post #2 of 4 (176 views)
Permalink
Usa of "source" in startup scripts [In reply to]

On Friday 17 June 2005 14:26, Florian Boor wrote:
> while integrating some maemo software into OpenEmbedded i ran into trouble
> because many startup scripts used "source" instead of "." to source external
> files. This seems to be a feature of bash and isn't implemented in busybox
ash i

It's a POSIX feature. And support for it can be added to busybox ash with a
massive one-line patch. Ofcourse, "." is 5 chars shorter than "source", but
that is a micro-optimization in maemo platform scale... :-)

--
Riku


David.Weinehall at nokia

Jun 17, 2005, 1:21 PM

Post #3 of 4 (174 views)
Permalink
Usa of "source" in startup scripts [In reply to]

On fre, 2005-06-17 at 13:26 +0200, ext Florian Boor wrote:
> Hello,
>
> while integrating some maemo software into OpenEmbedded i ran into trouble
> because many startup scripts used "source" instead of "." to source external
> files. This seems to be a feature of bash and isn't implemented in busybox ash i
> use for the OpenEmbedded images.
> To make these scripts more portable i suggest to use ".".

Yup, definitely a bug. I think I need to package my "evilfinder" some
day; basically a program that scans shell-scripts and makefiles to find
use of non-POSIX shell functionality, and other non-POSIX things.

> I have some patches for various maemo bits attached.

Thanks!


Regards: David Weinehall


David.Weinehall at nokia

Jun 17, 2005, 1:44 PM

Post #4 of 4 (174 views)
Permalink
Usa of "source" in startup scripts [In reply to]

On fre, 2005-06-17 at 14:53 +0300, ext Riku Voipio wrote:
> On Friday 17 June 2005 14:26, Florian Boor wrote:
> > while integrating some maemo software into OpenEmbedded i ran into trouble
> > because many startup scripts used "source" instead of "." to source external
> > files. This seems to be a feature of bash and isn't implemented in busybox
> ash i
>
> It's a POSIX feature. And support for it can be added to busybox ash with a
> massive one-line patch. Ofcourse, "." is 5 chars shorter than "source", but
> that is a micro-optimization in maemo platform scale... :-)

Nopes, "source" is NOT a POSIX feature. It's listed neither in SuSv3
nor in SuSv2. "." is, on the other hand (though it's listed as "dot" in
the documentation, presumably to be easier to search for...)


Regards: David Weinehall

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.