-
Notifications
You must be signed in to change notification settings - Fork 0
/
creating_env_ak_sm_recorder.sh
52 lines (40 loc) · 1.25 KB
/
creating_env_ak_sm_recorder.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# HEADER FOR BASH SCRIPTS
# Project: AK_SM_RECORDER Azure Kinect SM Recorder https://github.com/GRAP-UdL-AT/ak_sm_recorder
#
# * PAgFRUIT http://www.pagfruit.udl.cat/en/
# * GRAP http://www.grap.udl.cat/
#
# Author: Juan Carlos Miranda. https://github.com/juancarlosmiranda
set -e
FILENAME_ZIP='ak_sm_recorder-main.zip'
REQUERIMENTS_LINUX='requirements_linux.txt'
# commands definitions
PYTHON_CMD='python3'
UNZIP_CMD=`which unzip`
MKDIR_CMD='mkdir -p'
CHMOD_CMD='chmod 755'
PIP_INSTALL_CMD='pip install'
PIP_UPDATE_CMD='pip install --upgrade pip'
# files extensions names
EXT_SCRIPTS_SH='*.sh'
EXT_ZIP='.zip'
# folders names definitions
DEVELOPMENT_PATH='development'
DEVELOPMENT_ENV_PATH='development_env'
COMMON_ENV_PATH='bin/activate'
# software folders names
SM_RECORDER_NAME='ak_sm_recorder-main'
# project folders
ROOT_FOLDER_F=$HOME/$DEVELOPMENT_PATH/
SM_RECORDER_NAME_F=$ROOT_FOLDER_F$SM_RECORDER_NAME/
# environment folders
ENV_NAME='_venv'
ROOT_ENV_F=$HOME/$DEVELOPMENT_ENV_PATH/
SM_RECORDER_ENV_F=$ROOT_ENV_F$SM_RECORDER_NAME$ENV_NAME/
# creating environments automatically
$PYTHON_CMD -m venv $SM_RECORDER_ENV_F
source $SM_RECORDER_ENV_F$COMMON_ENV_PATH
$PIP_UPDATE_CMD
$PIP_INSTALL_CMD -r $SM_RECORDER_NAME_F$REQUERIMENTS_LINUX
deactivate