From 58482f612c447c8d1991ab5b0857b4471b827f7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Fri, 1 Mar 2013 10:38:19 +0100 Subject: [PATCH] Added script for creating repository on remote server. --- prj-create-repo.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 prj-create-repo.pl diff --git a/prj-create-repo.pl b/prj-create-repo.pl new file mode 100755 index 0000000..bf083c1 --- /dev/null +++ b/prj-create-repo.pl @@ -0,0 +1,19 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Config::General; +use Net::SSH::Perl; + +# prj-create-repo.pl "login@host" "path/project.git" + +my ($login, $host) = split(/@/, shift); +my $path = shift; + +print "Logging to $host...\n"; +my $ssh = Net::SSH::Perl->new($host, debug => 0); +$ssh->login($login, ""); + +print "Creating remote Git Repository...\n"; +my ($stdout, $stderr, $exit) = $ssh->cmd("mkdir $path && cd $path && git init --bare"); +print $stdout; -- 2.30.2