Skip to content

Commit

Permalink
Bugfix: buggy users don't read INSTALL
Browse files Browse the repository at this point in the history
Probably some of them don't have the necessary prereqs to compile
either, but at least now it tells them to read the INSTALL file instead
of throwing an error about not finding 'hairtunes'.
  • Loading branch information
abrasive committed Apr 23, 2011
1 parent 72e2f57 commit aecb979
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shairport.pl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@
# suppose hairtunes is under same directory
my $hairtunes_cli = $FindBin::Bin . '/hairtunes';

unless (-x $hairtunes_cli) {
say "Can't find the 'hairtunes' decoder binary, you need to build this before using Shairport.";
say "Trying to build it for you anyway...";
system("cd ${FindBin::Bin}; make || gmake");
die("Nope, didn't work out. Read the INSTALL instructions!") unless -x $hairtunes_cli;
say "Phew! Worked out okay, by the looks of it.";
}

GetOptions("a|apname=s" => \$apname,
"p|password=s" => \$password,
"i|pipe=s" => \$pipepath,
Expand Down

0 comments on commit aecb979

Please sign in to comment.