Fix log rotation.
[ovirt-node/TEMP.git] / autobuild.sh
blob0ac1e58e76afc9d37fe6e89e8696111d0c886bd4
1 #!/bin/sh
2 #oVirt node autobuild script
4 # Copyright (C) 2008 Red Hat, Inc.
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; version 2 of the License.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 # MA 02110-1301, USA. A copy of the GNU General Public License is
19 # also available at http://www.gnu.org/copyleft/gpl.html.
21 echo "Running oVirt Node Autobuild"
23 set -e
24 set -v
26 test -f Makefile && make -k distclean || :
28 ./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT
29 make
30 make install
32 rm -f *.tar.gz
33 make dist
35 if [ -f /usr/bin/rpmbuild ]; then
36 if [ -n "$AUTOBUILD_COUNTER" ]; then
37 EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
38 else
39 NOW=`date +"%s"`
40 EXTRA_RELEASE=".$USER$NOW"
42 rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean *.tar.gz