fixed a hardcoding mistake and accomodate for https

This commit is contained in:
Chris Lockfort 2011-10-24 16:04:33 -04:00
parent 85d276a4e5
commit 348bbc40f6

View file

@ -12,7 +12,7 @@ die "Could not complete github API query for $username\n" unless defined $page;
my @list = split(/\n/, $page);
my @urls = grep { /url/ } @list;
my @giturls = grep s/ :url: http/git/, @urls;
my @giturls = grep s/ :url: https/git/, @urls;
@urls = @giturls;
my @reponames = grep s/.*$username\///, @giturls;
@ -24,7 +24,7 @@ for(my $i = 0; $i < @urls; ++$i){
}
unless(-e "$backupdir/$name"){ #We haven't backed this up before, let's clone it
print "CLONING REPOSITORY: $url\n";
system("cd backups && git clone $url") and die "Encountered an error while git-cloning repository $name\n";
system("cd $backupdir && git clone $url") and die "Encountered an error while git-cloning repository $name\n";
}
else{ #We've backed it up before, just fetch the most recent copy
print "REPOSITORY EXISTED, FETCHING: $name\n";