Last change
on this file since 1562 was 1051, checked in by Bruno Cornec, 18 years ago |
Partial re-introduction of trunk changes for the next stable version (tools, contrib)
Preparation ofr addition of localisation patch to mondo
Should not compile in that state
|
-
Property svn:executable
set to
*
|
File size:
681 bytes
|
Rev | Line | |
---|
[1051] | 1 | #!/usr/bin/perl -w
|
---|
| 2 |
|
---|
| 3 | use strict;
|
---|
| 4 | use Data::Dumper;
|
---|
| 5 |
|
---|
| 6 | sub get_cmds {
|
---|
| 7 |
|
---|
| 8 | my $dumb;
|
---|
| 9 | my $f;
|
---|
| 10 |
|
---|
| 11 | open (FILE,"/bin/busybox --help 2>&1|") or die "Unable to call busybox";
|
---|
| 12 | undef $/;
|
---|
| 13 | ($dumb,$f) = split /functions:/,<FILE>;
|
---|
| 14 | close(FILE);
|
---|
| 15 | $f =~ s/\s//g;
|
---|
| 16 | return (split /,/,$f);
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | # Should probably be an absolute path
|
---|
| 20 | my $basedir = "symlinks";
|
---|
| 21 | my $tarfile = "$basedir.tgz";
|
---|
| 22 |
|
---|
| 23 | print "Making tarfile $tarfile ...\n";
|
---|
| 24 |
|
---|
| 25 | system ("rm -rf $basedir");
|
---|
| 26 | unlink $tarfile;
|
---|
| 27 |
|
---|
| 28 | mkdir $basedir,0755;
|
---|
| 29 | mkdir "$basedir/usr",0755;
|
---|
| 30 | mkdir "$basedir/usr/bin",0755;
|
---|
| 31 |
|
---|
| 32 | chdir "$basedir/usr/bin";
|
---|
| 33 | for my $l (get_cmds) {
|
---|
| 34 | symlink "../../bin/busybox",$l;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | chdir "../..";
|
---|
| 38 | system("tar cfz ../$tarfile .");
|
---|
| 39 | print "Done.\n";
|
---|
| 40 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.