source:
ProjectBuilder/0.7.11/pb/bin/ptest.pl@
1937
| Last change on this file since 1937 was 2, checked in by , 19 years ago | |
|---|---|
|
|
| File size: 681 bytes | |
| Line | |
|---|---|
| 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.
