2019-04-05 21:49:50 +02:00
|
|
|
[ -d venv ]
|
|
|
|
FIRST_RUN=$?
|
|
|
|
|
|
|
|
# Create and enter virtual environment
|
|
|
|
if (( $FIRST_RUN )); then
|
|
|
|
echo Creating virtual environment
|
|
|
|
python3 -m venv venv
|
|
|
|
fi
|
|
|
|
source venv/bin/activate
|
|
|
|
|
|
|
|
# Install required python packages
|
|
|
|
if (( $FIRST_RUN )); then
|
|
|
|
echo Installing required Python packages
|
|
|
|
pip install -Ur requirements.txt
|
|
|
|
fi
|
2019-04-05 22:08:41 +02:00
|
|
|
|
|
|
|
function run() {
|
2019-04-06 01:16:02 +02:00
|
|
|
python -m nightr
|
|
|
|
}
|