1
0
mirror of synced 2025-01-18 22:24:04 +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('.'))")
python3 -m bemani.utils.twodxutils "$@"
import sys
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('.'))")
python3 -m bemani.utils.api "$@"
import sys
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('.'))")
python3 -m bemani.utils.arcutils "$@"
import sys
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
import csv # type: ignore
import argparse
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('.'))")
python3 -m bemani.utils.bemanishark "$@"
import sys
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('.'))")
python3 -m bemani.utils.binutils "$@"
import sys
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('.'))")
python3 -m bemani.utils.cardconvert "$@"
import sys
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('.'))")
python3 -m bemani.utils.dbutils "$@"
import sys
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('.'))")
python3 -m bemani.utils.frontend "$@"
import sys
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('.'))")
python3 -m bemani.utils.ifsutils "$@"
import sys
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('.'))")
python3 -m bemani.utils.iidxutils "$@"
import sys
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('.'))")
python3 -m bemani.utils.proxy "$@"
import sys
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('.'))")
python3 -m bemani.utils.psmap "$@"
import sys
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('.'))")
python3 -m bemani.utils.read "$@"
import sys
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('.'))")
python3 -m bemani.utils.replay "$@"
import sys
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('.'))")
python3 -m bemani.utils.responsegen "$@"
import sys
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('.'))")
python3 -m bemani.utils.scheduler "$@"
import sys
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('.'))")
python3 -m bemani.utils.services "$@"
import sys
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('.'))")
python3
import sys
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('.'))")
python3 -m bemani.utils.struct "$@"
import sys
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('.'))")
python3 -m bemani.utils.trafficgen "$@"
import sys
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('.'))")
python3 -m unittest discover -s bemani/tests "$@"
import sys
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__")