Merge pull request #731 from eeff/eeff/dev

fix: migrate.py to support both python and python3
This commit is contained in:
fengzeroz
2022-08-24 13:54:09 +08:00
committed by GitHub
+14 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/bin/sh
#
# NEURON IIoT System for Industry 4.0
# Copyright (C) 2020-2022 EMQ Technologies Co., Ltd All rights reserved.
@@ -18,6 +18,19 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
"""":
if type python3 > /dev/null 2>&1
then
exec python3 "$0" "$@"
elif type python > /dev/null 2>&1
then
exec python "$0" "$@"
else
echo >&2 "Python not installed"
fi
exit 1
""" # """
from __future__ import print_function
import argparse