Add execution script
This commit is contained in:
parent
d5394d836a
commit
274ba9da32
19
alakazam.sh
Executable file
19
alakazam.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Get the directory of the script being run.
|
||||
SCRIPT_DIR="$( cd "$( dirname "$( readlink -f "${BASH_SOURCE[0]}" )" )" &> /dev/null && pwd )"
|
||||
VENV_PATH=$SCRIPT_DIR/.venv
|
||||
|
||||
# check if venv exists
|
||||
if [ ! -d $VENV_PATH ]; then
|
||||
echo install virtual environment: $VENV_PATH
|
||||
python3 -m venv $VENV_PATH
|
||||
source $VENV_PATH/bin/activate
|
||||
pip3 install -r requirements.txt
|
||||
deactivate
|
||||
fi
|
||||
|
||||
# Activate the virtual environment
|
||||
source $VENV_PATH/bin/activate
|
||||
python3 $SCRIPT_DIR/alakazam.py $@
|
||||
deactivate
|
@ -4,3 +4,4 @@ ruamel.yaml==0.18.3
|
||||
Jinja2==2.11.3
|
||||
MarkupSafe==1.1.1
|
||||
python-dotenv==1.0.0
|
||||
icecream==2.1.3
|
||||
|
Loading…
Reference in New Issue
Block a user