blob: e3d138bd192d4c88984ee996821463fb011d4257 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/usr/bin/env python
2# ex:ts=4:sw=4:sts=4:et
3# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
4#
5# Copyright (C) 2003, 2004 Chris Larson
6# Copyright (C) 2003, 2004 Phil Blundell
7# Copyright (C) 2003 - 2005 Michael 'Mickey' Lauer
8# Copyright (C) 2005 Holger Hans Peter Freyther
9# Copyright (C) 2005 ROAD GmbH
10# Copyright (C) 2006 Richard Purdie
11#
12# This program is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License version 2 as
14# published by the Free Software Foundation.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License along
22# with this program; if not, write to the Free Software Foundation, Inc.,
23# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
25import os
26import sys
27
28sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)),
29 'lib'))
30try:
31 import bb
32except RuntimeError as exc:
33 sys.exit(str(exc))
34
35from bb import cookerdata
36from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
37
38__version__ = "1.27.1"
39
40if __name__ == "__main__":
41 if __version__ != bb.__version__:
42 sys.exit("Bitbake core version and program version mismatch!")
43 try:
44 sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
45 cookerdata.CookerConfiguration()))
46 except BBMainException as err:
47 sys.exit(err)
48 except bb.BBHandledException:
49 sys.exit(1)
50 except Exception:
51 import traceback
52 traceback.print_exc()
53 sys.exit(1)