1
0
mirror of synced 2025-01-31 12:13:49 +01:00

Update scripts to remove incorrect bash invocation and make them execute from any directory.

This commit is contained in:
Jennifer Taylor 2020-05-12 21:01:16 +00:00
parent 74e0259129
commit e126b845f6
22 changed files with 194 additions and 65 deletions

View File

@ -1,4 +1,9 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.twodxutils "$@" sys.path.append(path)
import runpy
runpy.run_module("bemani.utils.twodxutils", run_name="__main__")

12
api
View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.api "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.arcutils "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,6 +1,5 @@
#! /usr/bin/env python3
# vim: set fileencoding=utf-8 # vim: set fileencoding=utf-8
import csv # type: ignore import csv # type: ignore
import argparse import argparse
import copy import copy

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.bemanishark "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.binutils "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.cardconvert "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

12
dbutils
View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.dbutils "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.frontend "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.ifsutils "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.iidxutils "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

12
proxy
View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.proxy "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

12
psmap
View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.psmap "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

12
read
View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.read "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

12
replay
View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.replay "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.responsegen "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.scheduler "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.services "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

11
shell
View File

@ -1,4 +1,9 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 sys.path.append(path)
import code
code.InteractiveConsole().interact()

12
struct
View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.struct "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,10 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m bemani.utils.trafficgen "$@" sys.path.append(path)
import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,4 +1,16 @@
#! /bin/bash #! /usr/bin/env python3
import os
path = os.path.abspath(os.path.dirname(__file__))
export PYTHONPATH=$(python -c "import os; print(os.path.realpath('.'))") import sys
python3 -m unittest discover -s bemani/tests "$@" sys.path.append(path)
sys.argv = [
sys.argv[0],
"discover",
"-s",
os.path.join(path, "bemani/tests"),
*sys.argv[1:],
]
import runpy
runpy.run_module("unittest", run_name="__main__")