summaryrefslogtreecommitdiffstats
path: root/source-builder/sb-get-sources
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2020-08-25 21:21:50 +1000
committerChris Johns <chrisj@rtems.org>2020-08-25 21:21:50 +1000
commit650c6f99333c7f163f81817d3f71f93d0ae17ee4 (patch)
treeddd15ac1a9a08c7631e2e5eb2101682351f52520 /source-builder/sb-get-sources
parentMove 5 build sets to 6 (diff)
downloadrtems-source-builder-650c6f99333c7f163f81817d3f71f93d0ae17ee4.tar.bz2
sb: Use shebang env python
Closes #4037
Diffstat (limited to 'source-builder/sb-get-sources')
-rwxr-xr-xsource-builder/sb-get-sources23
1 files changed, 13 insertions, 10 deletions
diff --git a/source-builder/sb-get-sources b/source-builder/sb-get-sources
index d9f03b7..97ee419 100755
--- a/source-builder/sb-get-sources
+++ b/source-builder/sb-get-sources
@@ -1,7 +1,7 @@
-#! /bin/sh
+#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2019 Chris Johns (chrisj@rtems.org)
+# Copyright 2010-2019 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -17,11 +17,14 @@
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-set -e
-base=$(dirname $0)
-PYTHON_CMD=${base}/sb/cmd-get-sources.py
-if test -f ${base}/sb/python-wrapper.sh; then
- . ${base}/sb/python-wrapper.sh
-fi
-echo "error: python wrapper not found"
+
+from __future__ import print_function
+
+
+try:
+ import sb.getsources
+ sb.getsources.run()
+except ImportError:
+ import sys
+ print("Incorrect Source Builder installation", file = sys.stderr)
+ sys.exit(1)