mirror of
https://github.com/clockfort/GitHub-Backup.git
synced 2025-03-09 00:00:03 +01:00
fixed a hardcoding mistake and accomodate for https
This commit is contained in:
parent
85d276a4e5
commit
348bbc40f6
1 changed files with 2 additions and 2 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue