2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-11 13:10:45 +00:00
Comrad/bin/comrad-app

47 lines
1.0 KiB
Plaintext
Raw Normal View History

2020-09-14 16:17:50 +00:00
#!/bin/bash
##
# Run the mobile app
##
2020-10-04 10:44:13 +00:00
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
2020-09-14 16:17:50 +00:00
2020-09-28 13:17:52 +00:00
# funcs (mac doesnt have realpath)
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
2020-10-05 09:13:12 +00:00
path_lib="`realpath ~/comrad/lib`"
2020-09-29 13:09:56 +00:00
path_conda="`realpath ~/comrad/lib/miniconda3`"
path_venv="`realpath ~/comrad/code/venv`"
path_repo="`realpath ~/comrad/code`"
2020-09-28 13:17:52 +00:00
2020-10-05 10:36:28 +00:00
source "$path_conda/etc/profile.d/conda.sh"
2020-10-05 09:13:12 +00:00
# export PATH="$path_conda/Library/bin:$path_conda/Scripts:$path_conda:$PATH"
2020-10-01 16:37:44 +00:00
export PATH="$path_conda/bin:$PATH"
2020-10-05 09:13:12 +00:00
# export PATH="$path_lib/themis-master/build:/usr/local/bin:$PATH"
2020-10-04 10:44:13 +00:00
2020-10-01 16:37:44 +00:00
conda activate $path_venv
2020-10-05 10:36:28 +00:00
echo "Python: `which python`"
2020-10-05 09:13:12 +00:00
2020-10-01 16:30:23 +00:00
# update?
path_repo_git="$path_repo/.git"
if [ -d "$path_repo_git" ]
then
pushd $path_repo && git pull
fi
2020-10-04 20:41:46 +00:00
2020-10-04 19:43:06 +00:00
python -m pip install -r $path_repo/requirements.txt -q
2020-09-29 13:09:56 +00:00
python $path_repo/comrad/app/main.py