Changeset 7f335a4 in OpenWorkouts-current for bin/install
- Timestamp:
- Feb 18, 2019, 1:14:27 PM (5 years ago)
- Branches:
- current, feature/docs, master
- Children:
- 82a4c44
- Parents:
- 4af38e8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bin/install
r4af38e8 r7f335a4 10 10 # Full path to the env 11 11 env_path=${current}/env 12 12 # full path to the install logs 13 install_log=${current}/var/log/install.log 13 14 14 15 set_scripts_permissions() { 16 echo "Setting up script permissions" 15 17 # ensure the shell scripts we will need have proper permissions 16 18 chmod u+x ${current}/bin/js_deps … … 23 25 # ok 24 26 python_bin=`command -v python3` 27 echo "Found valid python installation: ${python_bin}" 25 28 return 26 29 else … … 30 33 if `command -v python` -c "import sys; exit(0) if sys.version.startswith('3.') else exit(1)"; then 31 34 python_bin=`command -v python` 35 echo "Found valid python installation: ${python_bin}" 32 36 return 33 37 else … … 46 50 create_venv() { 47 51 # create a new virtual environment 52 echo "Creating new python virtual environment [${env_path}]" 48 53 ${python_bin} -m venv ${env_path} 49 54 } … … 51 56 upgrade_pip_setuptools() { 52 57 . ${env_path}/bin/activate 53 yes | pip install --upgrade setuptools pip 58 echo "Upgrading python packaging tools" 59 yes | pip install --upgrade setuptools pip >> ${install_log}.stdout 2>> ${install_log}.stderr 54 60 deactivate 55 61 } … … 57 63 install_openworkouts() { 58 64 . ${env_path}/bin/activate 59 yes | pip install --upgrade -e ${current}[testing] 65 echo "Installing OpenWorkouts dependencies" 66 yes | pip install --upgrade -e ${current}[testing] >> ${install_log}.stdout 2>> ${install_log}.stderr 60 67 deactivate 61 68 } 62 69 63 70 install_js_deps() { 64 ${current}/bin/js_deps 71 echo "Installing javascript components" 72 ${current}/bin/js_deps >> ${install_log}.stdout 2>> ${install_log}.stderr 65 73 } 66 74 … … 71 79 echo "" 72 80 echo " cd ${current} && ./bin/start" 81 echo "" 82 echo "(the installation script left a log under ${install_log})" 73 83 echo "" 74 84 # echo "You can stop any running OpenWorkouts instances calling:" … … 85 95 install_js_deps 86 96 setup_start_stop 87 88 echo ${python_bin}
Note: See TracChangeset
for help on using the changeset viewer.