Changeset 650c6f9 in rtems-source-builder for source-builder/sb-set-builder


Ignore:
Timestamp:
Aug 25, 2020, 11:21:50 AM (14 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
c51f634
Parents:
40af487
Message:

sb: Use shebang env python

Closes #4037

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb-set-builder

    r40af487 r650c6f9  
    1 #! /bin/sh
     1#! /usr/bin/env python
    22#
    33# RTEMS Tools Project (http://www.rtems.org/)
    4 # Copyright 2018 Chris Johns (chrisj@rtems.org)
     4# Copyright 2010-2012 Chris Johns (chrisj@rtems.org)
    55# All rights reserved.
    66#
     
    1818# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    1919# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20 #
    21 set -e
    22 base=$(dirname $0)
    23 PYTHON_CMD=${base}/sb/cmd-set-builder.py
    24 if test -f ${base}/sb/python-wrapper.sh; then
    25   . ${base}/sb/python-wrapper.sh
    26 fi
    27 echo "error: python wrapper not found"
     20
     21from __future__ import print_function
     22
     23try:
     24    import sb.setbuilder
     25    sb.setbuilder.run()
     26except ImportError:
     27    import sys
     28    print("Incorrect Source Builder installation", file = sys.stderr)
     29    sys.exit(1)
Note: See TracChangeset for help on using the changeset viewer.