Skip to content

Commit

Permalink
Merge commit '8e8832f'
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Apr 16, 2011
2 parents a49f097 + 8e8832f commit 8ae1246
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions shairport.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use POSIX ":sys_wait_h";
eval "use IO::Socket::INET6;";

my $shairportversion = "0.05";

# Configure the following two options:
# AP name - as will be shown in iTunes' menu
Expand All @@ -51,11 +52,26 @@
# suppose hairtunes is under same directory
my $hairtunes_cli = $FindBin::Bin . '/hairtunes';

GetOptions("apname=s" => \$apname,
"password=s" => \$password,
"d" => \$daemon);
GetOptions("a|apname=s" => \$apname,
"p|password=s" => \$password,
"d" => \$daemon,
"h|help" => \$help);

sub usage {
print "Shairport version $shairportversion - Airport Express emulator\n".
"Usage:\n".
"$0 [OPTION...]\n".
"\n".
"Options:\n".
" -a, --apname=AirPort Sets AirPort name\n".
" -p, --password=secret Sets password\n",
" -d Daemon mode\n",
" -h, --help This help\n",
"\n";
exit;
}

# use --apname MyName --password secret as arguments
if (defined($help) && $help == 1) { usage(); }

chomp $apname;

Expand Down

0 comments on commit 8ae1246

Please sign in to comment.