From 3f1d89f56f9f41984f6783171e94d5b0d83715a3 Mon Sep 17 00:00:00 2001 From: Maps Date: Thu, 20 Jun 2013 19:43:06 +0200 Subject: [PATCH] git update working --- tools/gitupdate.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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"; -- 2.43.0