mirror of
https://github.com/ComradCollective/Comrad
synced 2024-11-13 07:10:49 +00:00
48 lines
1.0 KiB
Bash
Executable File
48 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
##
|
|
# Run the mobile app
|
|
##
|
|
unameOut="$(uname -s)"
|
|
case "${unameOut}" in
|
|
Linux*) machine=Linux;;
|
|
Darwin*) machine=Mac;;
|
|
CYGWIN*) machine=Cygwin;;
|
|
MINGW*) machine=MinGw;;
|
|
MSYS*) machine=MinGw;;
|
|
*) machine="UNKNOWN:${unameOut}"
|
|
esac
|
|
|
|
# funcs (mac doesnt have realpath)
|
|
realpath() {
|
|
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
|
|
}
|
|
|
|
path_lib="`realpath ~/comrad/lib`"
|
|
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/Library/bin:$path_conda/Scripts:$path_conda:$PATH"
|
|
export PATH="$path_conda/bin:$PATH"
|
|
# export PATH="$path_lib/themis-master/build:/usr/local/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 -q
|
|
python $path_repo/comrad/app/main.py |