Created
October 30, 2011 19:09
-
-
Save metaperl/1326294 to your computer and use it in GitHub Desktop.
Perl script to download and untar the latest solidcoin bzip for linux
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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| my $url = shift or die "Must supply URL to unix/linux bzip file"; | |
| use URI; | |
| my $u = URI->new($url); | |
| my @segment = $u->path_segments; | |
| my $bzip_file = $segment[$#segment]; | |
| my $d = 'download'; | |
| `mkdir $d`; | |
| chdir $d; | |
| `wget $url`; | |
| warn `bzip2 -dc $bzip_file | tar xvf -`; | |
| `mv solidcoin solidcoind ..`; | |
| =pod | |
| usage: ./untar.pl url | |
| where url is something like http://solidcoin.info/downloads/solidcoin-201b10-linux32.tar.bz2 | |
| =cut | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment