master > master: allgemeine Aufräumung
This commit is contained in:
31
code/scripts/build.sh
Executable file
31
code/scripts/build.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
################################################################################################
|
||||
# NOTE: `chmod +x build.sh` vorher ausführen, um dieses Skript benutzen zu können.
|
||||
################################################################################################
|
||||
|
||||
################################
|
||||
# HILFSMETHODEN
|
||||
################################
|
||||
|
||||
function call_python() {
|
||||
[ "$OSTYPE" == "msys" ] && py -3 $@ || python3 $@;
|
||||
}
|
||||
|
||||
function check_requirements() {
|
||||
call_python -m pip install "$( cat requirements )" >> /dev/null;
|
||||
}
|
||||
|
||||
function run_code() {
|
||||
call_python main.py;
|
||||
}
|
||||
|
||||
################################
|
||||
# HAUPTVORGÄNGE
|
||||
################################
|
||||
|
||||
# Kann auskommentiert werden, wenn nötige Module schon installiert:
|
||||
check_requirements;
|
||||
|
||||
# Code ausführen:
|
||||
run_code;
|
||||
Reference in New Issue
Block a user