master > master: script zur einfachen Ausführung hinzugefügt

This commit is contained in:
RD
2021-05-06 10:41:12 +02:00
parent 57070f4df1
commit 900befbb4e
4 changed files with 30 additions and 5 deletions

23
code/run.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
################################################################################################
# NOTE: `chmod +x *.sh` vorher ausführen, um dieses Skript benutzen zu können.
################################################################################################
function run_python() {
[ "$OSTYPE" == "msys" ] && py -3 $@ || python3 $@;
}
function run_pip() {
run_python -m pip $@;
}
function run_check_requirements() {
run_pip install "$( cat requirements )" >> /dev/null;
}
# Kann auskommentiert werden, wenn nötige Module schon installiert:
run_check_requirements;
# Code ausführen:
run_python main.py;