Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

do not pull all the damn time

  • Loading branch information...
commit f22710e62124b0621388c466bf4e4ab104487b28 1 parent 5dfebc1
@rjbs authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  ghclone
View
3  ghclone
@@ -13,6 +13,7 @@ my ($opt, $usage) = describe_options(
[ 'base|b!', 'produce bare clones' ],
[ 'login|l=s', 'login to use (instead of config)' ],
[ 'token|t=s', 'token to use (instead of config)' ],
+ [ 'clonely|c', 'only clone things that do not exist; skip others' ],
);
my $config = Config::INI::Reader->read_file("$ENV{HOME}/.gitconfig");
@@ -35,7 +36,7 @@ for my $repo (sort { $a->{name} cmp $b->{name} } @repositories) {
my $uri = sprintf 'git@github.com:%s/%s.git', $login, $name;
if (-d $name) {
- do_cmd("cd $name && git pull 2>&1");
+ do_cmd("cd $name && git pull 2>&1") unless $opt->{clonely};
} else {
my $bare = $opt->{bare} ? '--bare' : '';
do_cmd("git clone $bare $uri 2>&1");
Please sign in to comment.
Something went wrong with that request. Please try again.