Skip to content

Commit

Permalink
Updating tmpl scripts for all sites
Browse files Browse the repository at this point in the history
  • Loading branch information
gragghia authored and gragghia committed May 31, 2024
1 parent c812dca commit 9391d17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions hpcg/tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ sub getfile {

sub update {
chdir '/var/repo';
print header(), `git pull 2>&1`;
return 1;
my $msg = `git pull 2>&1`;
my $code = $? ? 500 : 200;
print header( -status=>$code, -charset=>'UTF-8' );
print $msg;
}

sub main {
Expand Down
6 changes: 4 additions & 2 deletions hpl-mxp.org/tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ sub getfile {

sub update {
chdir '/var/repo';
print header(), `git pull 2>&1`;
return 1;
my $msg = `git pull 2>&1`;
my $code = $? ? 500 : 200;
print header( -status=>$code, -charset=>'UTF-8' );
print $msg;
}

sub main {
Expand Down

0 comments on commit 9391d17

Please sign in to comment.