30 lines
542 B
Bash
Executable File
30 lines
542 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if ! [[ "$1" =~ ^(install|clean|run) ]]; then
|
|
echo "usage: $0 [action]"
|
|
echo "where action can be: [install, clean, run]"
|
|
exit 1
|
|
fi
|
|
|
|
case $1 in
|
|
|
|
install)
|
|
echo "intalling virtual environment and dependecies"
|
|
python -m venv venv
|
|
source venv/bin/activate
|
|
pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
;;
|
|
clean)
|
|
echo "cleaning up"
|
|
rm -rf venv
|
|
;;
|
|
run)
|
|
echo "running"
|
|
source venv/bin/activate
|
|
export MAGICK_HOME=/opt/homebrew/Cellar/imagemagick/7.1.1-15_1
|
|
# exec python $2 "${@:3}"
|
|
esac
|
|
|
|
|