You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
580 B
Bash
29 lines
580 B
Bash
#!/bin/bash
|
|
|
|
##
|
|
# Run the mobile app
|
|
##
|
|
|
|
|
|
# funcs (mac doesnt have realpath)
|
|
realpath() {
|
|
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
|
|
}
|
|
|
|
path_conda="`realpath ~/comrad/lib/miniconda3`"
|
|
path_venv="`realpath ~/comrad/code/venv`"
|
|
path_repo="`realpath ~/comrad/code`"
|
|
|
|
source $path_conda/etc/profile.d/conda.sh
|
|
export PATH="$path_conda/bin:$PATH"
|
|
conda activate $path_venv
|
|
|
|
# update?
|
|
path_repo_git="$path_repo/.git"
|
|
if [ -d "$path_repo_git" ]
|
|
then
|
|
pushd $path_repo && git pull
|
|
fi
|
|
|
|
python -m pip install -r $path_repo/requirements.txt
|
|
python $path_repo/comrad/app/main.py |