Skip to content

Instantly share code, notes, and snippets.

@metaperl
Created October 30, 2011 19:09
Show Gist options
  • Select an option

  • Save metaperl/1326294 to your computer and use it in GitHub Desktop.

Select an option

Save metaperl/1326294 to your computer and use it in GitHub Desktop.
Perl script to download and untar the latest solidcoin bzip for linux
#!/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