1
0
mirror of https://github.com/sebastianbergmann/docker-amiga-gcc.git synced 2026-05-03 18:56:52 +00:00
Files
docker-amiga-gcc-vamos/bin/check-for-updates
Sebastian Bergmann 35eb8d1599 Refactor
2019-08-30 12:27:20 +02:00

42 lines
923 B
PHP
Executable File

#!/usr/bin/env php
<?php declare(strict_types=1);
$repositories = [
'adtools/sfdc',
'AmigaPorts/libSDL12',
'bebbo/amiga-gcc',
'bebbo/amiga-netinclude',
'bebbo/aros-stuff',
'bebbo/binutils-gdb',
'bebbo/clib2',
'bebbo/fd2pragma',
'bebbo/gcc',
'bebbo/ira',
'bebbo/ixemul',
'bebbo/libdebug',
'bebbo/libnix',
'bebbo/newlib-cygwin',
'bebbo/vbcc',
'cahirwpz/fd2sfd',
'jca02266/lha',
'leffmann/vasm',
'leffmann/vlink',
];
foreach ($repositories as $repository) {
$file = __DIR__ . '/.revisions/' . $repository;
$old = trim(file_get_contents($file));
$new = trim(
shell_exec(
'git ls-remote https://github.com/' . $repository . '.git | grep HEAD | awk \'{ print $1}\''
)
);
if ($old !== $new) {
print $repository . ' has new commits' . PHP_EOL;
file_put_contents($file, $new);
}
}