mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 14:32:24 +00:00
Pickup of latest buildall.pl working.
This commit is contained in:
parent
e68743eadc
commit
4981afd55a
2 changed files with 10 additions and 7 deletions
|
|
@ -1,4 +1,11 @@
|
||||||
# Checksum tests
|
# Checksum tests
|
||||||
|
#
|
||||||
|
# Checksums object binaries (*.o) and compares with previous
|
||||||
|
# checksum for this branch.
|
||||||
|
#
|
||||||
|
# Note: OPC.o and OPM.o are omitted as they both have text string constants
|
||||||
|
# that include the build date.
|
||||||
|
|
||||||
|
|
||||||
md5=md5
|
md5=md5
|
||||||
if which md5sum >/dev/null 2>&1; then md5=md5sum; fi
|
if which md5sum >/dev/null 2>&1; then md5=md5sum; fi
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ use POSIX "strftime";
|
||||||
use CGI qw(:standard escapeHTML);
|
use CGI qw(:standard escapeHTML);
|
||||||
use JSON;
|
use JSON;
|
||||||
|
|
||||||
|
|
||||||
sub writelog {
|
sub writelog {
|
||||||
my ($msg) = @_;
|
my ($msg) = @_;
|
||||||
|
|
||||||
|
|
@ -27,20 +28,15 @@ my $name = $postdata->{'head_commit'}->{'author'}->{'name'};
|
||||||
my $branch = $ref; $branch =~ s'^.*\/'';
|
my $branch = $ref; $branch =~ s'^.*\/'';
|
||||||
my $repo = $url; $repo =~ s'^.*\/'';
|
my $repo = $url; $repo =~ s'^.*\/'';
|
||||||
|
|
||||||
#my $repo="repo"; my $branch="branch"; my $name="name";
|
|
||||||
|
|
||||||
writelog "Post push github web hook for repository $repo, branch $branch, name $name.";
|
writelog "Post push github web hook for repository $repo, branch $branch, name $name.";
|
||||||
|
|
||||||
|
|
||||||
my $child = fork;
|
my $child = fork;
|
||||||
if (not defined $child) {die "Fork failed.";}
|
if (not defined $child) {die "Fork failed.";}
|
||||||
if ($child) {
|
if ($child) {
|
||||||
# parent process
|
writelog "Started buildall, pid = $child."; # parent process
|
||||||
writelog "Started buildall, pid = $child.";
|
|
||||||
} else {
|
} else {
|
||||||
# child process
|
close(STDIN); close(STDOUT); close(STDERR); # child process
|
||||||
close(STDIN); close(STDOUT); close(STDERR);
|
|
||||||
chdir "/var/lib/nethserver/ibay/githubhook";
|
|
||||||
unlink "buildall.pl";
|
unlink "buildall.pl";
|
||||||
system 'wget https://raw.githubusercontent.com/vishaps/voc/v2docs/src/tools/make/buildall.pl';
|
system 'wget https://raw.githubusercontent.com/vishaps/voc/v2docs/src/tools/make/buildall.pl';
|
||||||
exec 'perl buildall.pl >/tmp/buildall.log';
|
exec 'perl buildall.pl >/tmp/buildall.log';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue