]> git.deb.at Git - deb/packages.git/blob - cron.d/010git
fix off-by-one after switching on the brain again
[deb/packages.git] / cron.d / 010git
1 #! /bin/bash
2
3 #   Copyright (c) 2004  Martin Schulze <joey@debian.org>
4 #   Copyright (c) 2006  Frank Lichtenheld <djpig@debian.org>
5 #
6 #   This program is free software; you can redistribute it and/or modify
7 #   it under the terms of the GNU General Public License as published by
8 #   the Free Software Foundation; either version 2 of the License, or
9 #   (at your option) any later version.
10 #
11 #   This program is distributed in the hope that it will be useful,
12 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #   GNU General Public License for more details.
15 #
16 #   You should have received a copy of the GNU General Public License
17 #   along with this program; if not, write to the Free Software
18 #   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20 . `dirname $0`/../config.sh
21
22 logs=${topdir}/files/logs
23 log=${logs}/git.log
24
25 cd ${topdir}
26
27 test -d $log || mkdir -p $logs
28
29 if [ -s $log ]
30 then
31     savelog -c 14 $log > /dev/null
32 fi
33
34 date > $log
35 git pull &> $log
36 date >> $log