From: Dobrica Pavlinusic Date: Mon, 25 Jun 2012 14:49:54 +0000 (+0200) Subject: multiple commands add,commit on same path X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;ds=sidebyside;h=34f6d7fd0ea33a37922a09516663b2853349d1c5;hp=1f42f8cda6eec5a99e660a929043934a896e5816;p=bak-git.git multiple commands add,commit on same path --- diff --git a/bak-git-server.pl b/bak-git-server.pl index 58d4dfe..d3a69d9 100755 --- a/bak-git-server.pl +++ b/bak-git-server.pl @@ -20,7 +20,7 @@ controll channel (or to pass through server ssh hops using C) RemoteForward 9001 192.168.42.42:9001 -bak command overview: +bak command, overview: bak add /path bak commit [/path [message]] @@ -37,6 +37,8 @@ bak command overview: bak - push all changed files to server + bak add,commit /path + See L for more information =cut @@ -190,6 +192,8 @@ while (my $client = $server->accept()) { } my $path = $rel_path =~ m{^/} ? $rel_path : "$pwd/$rel_path"; + foreach my $command ( split /,/, $command ) { # XXX command loop + warn "$hostname [$command] $on_host:$path | $message\n"; my $args_message = $message; @@ -285,6 +289,8 @@ while (my $client = $server->accept()) { print $client "ERROR: unknown command: $command\n"; } + } # XXX command, loop + close($client); }