Created
February 28, 2012 14:22
-
-
Save hogem/1932821 to your computer and use it in GitHub Desktop.
to make symlinks of busybox applets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $busybox = './busybox'; | |
my $help = qx{$busybox --help 2>&1}; | |
my ($data) = $help =~ m/Currently \s defined \s functions: (.*)/msx; | |
$data =~ s/\s+//g; | |
my @cmds = split ',' , $data; | |
for my $cmd (@cmds) { | |
#print "$cmd\n"; | |
symlink $busybox, $cmd or warn "$!"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or just use busybox --install -s if you ommit it, it will install in /bin/