|
1 |
| -#!/bin/sh |
2 |
| -: This is the Harmony compiler. |
| 1 | +#!/usr/bin/env python3 |
3 | 2 |
|
4 |
| -true <<'++COPYRIGHT++' |
5 |
| -Copyright (C) 2020, 2021 Robbert van Renesse |
6 |
| - |
7 |
| -Redistribution and use in source and binary forms, with or without |
8 |
| -modification, are permitted provided that the following conditions |
9 |
| -are met: |
| 3 | +import sys |
| 4 | +from harmony_model_checker.main import main |
10 | 5 |
|
11 |
| -1. Redistributions of source code must retain the above copyright |
12 |
| -notice, this list of conditions and the following disclaimer. |
13 |
| -
|
14 |
| -2. Redistributions in binary form must reproduce the above copyright |
15 |
| -notice, this list of conditions and the following disclaimer in the |
16 |
| -documentation and/or other materials provided with the distribution. |
17 |
| -
|
18 |
| -3. Neither the name of the copyright holder nor the names of its |
19 |
| -contributors may be used to endorse or promote products derived |
20 |
| -from this software without specific prior written permission. |
21 |
| -
|
22 |
| -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
23 |
| -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
24 |
| -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
25 |
| -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
26 |
| -COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
27 |
| -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
28 |
| -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
29 |
| -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
30 |
| -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
31 |
| -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
32 |
| -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
33 |
| -POSSIBILITY OF SUCH DAMAGE. |
34 |
| -++COPYRIGHT++ |
35 |
| - |
36 |
| -if python3 -V >/dev/null 2>&1 |
37 |
| -then |
38 |
| - PYTHON=python3 |
39 |
| -elif python -V >/dev/null 2>&1 |
40 |
| -then |
41 |
| - v=`python -V` |
42 |
| - case $v in |
43 |
| - "3."*) PYTHON=python ;; |
44 |
| - *) echo 'harmony requires python3 to run' >&2; exit 1 |
45 |
| - esac |
46 |
| -else |
47 |
| - echo 'harmony requires python3 to run' >&2; exit 1 |
48 |
| -fi |
49 |
| - |
50 |
| -$PYTHON `dirname $0`/compiler.py $@ |
| 6 | +if __name__ == '__main__': |
| 7 | + sys.exit(main()) |
0 commit comments