Created
November 21, 2013 07:43
-
-
Save wakaba/7577468 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
sub install_perl_apps_by_file ($$$) { | |
my ($perl_command, $perl_version, $file_name) = @_; | |
info_die "|$file_name| not found" unless -f $file_name; | |
open my $file, '<', $file_name or info_die "$file_name: $!"; | |
while (<$file>) { | |
tr/\x0D\x0A//d; | |
if (/^#/) { | |
# | |
} elsif (/^(\S+)\s+(\S+)$/) { | |
install_perl_app $perl_command, $perl_version, $1, name => $2; | |
} elsif (/^(\S+)$/) { | |
install_perl_app $perl_command, $perl_version, $1; | |
} | |
} | |
} # install_perl_apps_by_file | |
} elsif ($command->{type} eq 'install-perl-apps-by-list') { | |
my $file_name = "$RootDirName/config/perl/apps.txt"; | |
if (-f $file_name) { | |
install_perl_apps_by_file $PerlCommand, $perl_version, $file_name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment