From: Maps Date: Thu, 20 Jun 2013 17:43:06 +0000 (+0200) Subject: git update working X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=3f1d89f56f9f41984f6783171e94d5b0d83715a3;p=mvdsensorcontrol.git git update working --- diff --git a/tools/gitupdate.pl b/tools/gitupdate.pl index 56faf7c..87ac84a 100755 --- a/tools/gitupdate.pl +++ b/tools/gitupdate.pl @@ -9,11 +9,16 @@ use CGI::Carp qw(fatalsToBrowser); my $query = $ENV{'QUERY_STRING'}; sub cmd { - my @x = qx(cmd." 2>&1"); - print Dumper @x; + my ($c) = @_; + $c .= " 2>&1"; + my @x = qx($c); + foreach (@x) { + print "> ".$_; + } } + print "Running Git Update\n"; unless ($query =~ m/stable/) { @@ -31,6 +36,8 @@ unless ($query =~ m/config/) { print "Undoing changes in config files\n"; cmd("git checkout -- ../config ../temp"); +print "Pulling new data from server\n"; +cmd("git pull "); unless ($query =~ m/config/) { print "Copying configuration file folder back\n";