Created
December 11, 2008 20:37
-
-
Save sbrocket/34866 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Find the executable from the dsym. | |
| $dsymdir =~ /(.*)\/(.*).dSYM/; | |
| my $pathToDsym = $1; | |
| my $dsymBaseName = $2; | |
| my $executable = $dsymBaseName; | |
| $executable =~ s/\..*//g; # strip off the suffix, if any | |
| chop($executable); | |
| print STDERR "$executable\n"; | |
| # my @paths = glob "$pathToDsym/$dsymBaseName\{,/$executable,/Contents/MacOS/$executable}"; | |
| my @paths = glob "$pathToDsym/$dsymBaseName/$executable"; | |
| print STDERR "paths: @paths\n" if $opt{v}; | |
| # my @executablePath = grep { -x && ! -d } glob "$pathToDsym/$dsymBaseName\{,/$executable,/Contents/MacOS/$executable}"; | |
| my @executablePath = grep { -x && ! -d } glob "$pathToDsym/$dsymBaseName/$executable"; | |
| print STDERR "@executablePath\n"; | |
| my $executableCount = @executablePath; | |
| if ( $executableCount > 1 ) { | |
| print STDERR "Found more than one executable for a dsym: @executablePath\n" if $opt{v}; | |
| } | |
| if ( $executableCount >= 1 ) { | |
| if ( !matchesUUID($executablePath[0], $uuid, $arch) ) { | |
| print STDERR "UUID doesn't match dsym for executable $executablePath[0]\n" if $opt{v}; | |
| } else { | |
| print STDERR "Found executable $executablePath[0]\n" if $opt{v}; | |
| return $executablePath[0]; | |
| } | |
| } | |
| print STDERR "Did not find executable for dsym\n" if $opt{v}; | |
| return undef; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment