git://git.exim.org
/
buildfarm-client.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
707a489
)
Check, if git is available, before trying to update the client
author
Heiko Schlittermann (HS12-RIPE)
<hs@schlittermann.de>
Wed, 2 Nov 2016 22:43:28 +0000
(23:43 +0100)
committer
Heiko Schlittermann
<hs@schlittermann.de>
Wed, 2 Nov 2016 22:44:02 +0000
(23:44 +0100)
run_cron
patch
|
blob
|
history
diff --git
a/run_cron
b/run_cron
index caadf4bc5f2f5aa562e9e8d75d975c3e9d7dbd4e..278084e2cc788cea9b714351290022732744af56 100755
(executable)
--- a/
run_cron
+++ b/
run_cron
@@
-11,7
+11,8
@@
chdir $Bin or die "$0: Can't chdir '$Bin': $!\n";
# client installation. FIXME: What to do, if we have
# a 'detached' .git?
if (-d '.git') {
- my ($git) = grep { -x } map { "$_/git" } split /:/, $ENV{PATH};
+ die "$0: found .git dir, but git is not available\n"
+ if not grep { -x } map { "$_/git" } split /:/, $ENV{PATH};
system('git pull >/dev/null') == 0 or die $? >> 8;
}