Fixed too long password for mysql. Fixed no enable-drupal target. Fixed no email...
[prj-utils.git] / prj-create-repo.pl
1 #!/usr/bin/env perl
2
3 use strict;
4 use warnings;
5 use Config::General;
6 use Net::SSH::Perl;
7
8 if (! @ARGV) {
9   print "USAGE: prj-create-repo.pl 'login\@host:path/project.git'\n";
10   exit;
11 }
12
13 my ($login, $host) = split(/@/, shift);
14 my $path;
15 ($host, $path) = split(/:/, $host);
16
17 print "Logging to $host...\n";
18 my $ssh = Net::SSH::Perl->new($host, debug => 0);
19 $ssh->login($login, "");
20
21 print "Creating remote Git Repository...\n";
22 my ($stdout, $stderr, $exit) = $ssh->cmd("mkdir $path && cd $path && git init --bare");
23 print $stdout;